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

:root {
  /* True Black Theme */
  --bg-dark: #000000;
  --bg-page: #000000;
  --bg-sidebar: #000000;
  --bg-surface: #0a0a0a;
  --bg-surface-hover: #111111;
  --bg-control: #111111;
  --bg-control-hover: #1a1a1a;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  
  --text-primary: #ededed;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  
  /* Fonts */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Dimensions & Spacing */
  --sidebar-width: 240px;
  --header-height: 64px;
  --max-content-width: 960px;
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
  --border-radius-sm: 4px;
  
  color-scheme: dark;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #333;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  /* Very subtle CSS grid dot pattern for technical depth */
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-control);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  color: #fff;
  border: 1px solid var(--border-light);
}

/* Page Layout Shell */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Navigation Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.01em;
  width: 100%;
}

.brand-badge {
  font-size: 0.65rem;
  background: var(--bg-control);
  border: 1px solid var(--border-light);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
}

.sidebar-nav {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-left: 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: var(--bg-control);
}

.nav-item.active {
  color: #fff;
  background-color: transparent;
}

/* Razor-thin active indicator line */
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #fff;
  border-radius: 2px;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  opacity: 0.7;
}

.nav-item:hover svg, .nav-item.active svg {
  opacity: 1;
}

/* Main Content Panel */
.main-panel {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-dark);
}

/* Header */
.main-header {
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

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

.breadcrumbs-separator {
  color: var(--text-subtle);
}

.breadcrumbs-active {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-control);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.github-btn:hover {
  background: var(--bg-control-hover);
  color: #fff;
}

.github-btn svg {
  width: 14px;
  height: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--border-radius-sm);
}

.mobile-toggle:hover {
  background: var(--bg-control);
}

.mobile-toggle svg {
  width: 20px;
  height: 20px;
}

/* Main Content Area */
.content-viewport {
  flex: 1;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 64px 32px 96px;
}

/* Typography elements */
h1.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
  color: #fff;
}

p.page-lead {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* CTA Section */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #fff;
  color: #000;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-control);
}

/* Showcase Explorer */
.showcase-container {
  margin-bottom: 80px;
  display: flex;
  flex-direction: column;
}

.showcase-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.showcase-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

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

/* Floating Screenshot Frame */
.screenshot-frame {
  position: relative;
  width: 100%;
  padding-top: 66.66%; /* 3:2 Aspect Ratio */
  margin-bottom: 40px;
}

.mock-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-slide.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  z-index: 10;
}

.mock-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-md);
  /* Massive, ultra-soft drop shadow directly on the image */
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 30px 80px -20px rgba(0,0,0,1);
}

/* Segmented Control Switcher */
.showcase-tabs {
  display: inline-flex;
  align-self: flex-start;
  background: var(--bg-control);
  padding: 4px;
  border-radius: 99px;
  gap: 2px;
  margin-bottom: 40px;
  border: 1px solid var(--border-light);
}

.showcase-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.showcase-tab:hover {
  color: var(--text-primary);
}

.showcase-tab.active {
  background: #333;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Feature Explanations tied to showcase */
.showcase-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.explanation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  display: none;
  animation: cardFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.explanation-card.active {
  display: block;
}

.explanation-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--text-muted);
  display: block;
}

.explanation-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.explanation-description {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 640px;
}

.explanation-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
}

.explanation-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.explanation-feat svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-subtle);
  flex-shrink: 0;
}

/* Feature Grid section */
.features-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-medium);
}

.feature-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  background: var(--bg-control);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-icon-wrapper svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.feature-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.feature-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.feature-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  margin-top: auto;
  padding-top: 16px;
  transition: opacity 0.2s ease;
}

.feature-card-link:hover {
  opacity: 0.8;
}

.feature-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.feature-card-link:hover svg {
  transform: translateX(4px);
}

/* Styled Table Containers */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  margin: 32px 0;
}

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

th, td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
}

th {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.85rem;
}

td {
  color: var(--text-primary);
}

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

/* Documentation Content Structures */
.doc-section {
  border-top: 1px solid var(--border-light);
  padding-top: 48px;
  margin-top: 48px;
}

.doc-section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.doc-section > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 720px;
  line-height: 1.6;
}

/* Styled Step-by-Step checklist */
.checklist-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

.checklist-step {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  align-items: flex-start;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--bg-control);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-title {
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Warning & Note Banner Callouts */
.callout {
  padding: 20px 24px;
  border-radius: var(--border-radius-md);
  margin: 32px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
}

.callout.tldr {
  border-left: 2px solid #fff;
}

.callout.warning {
  border-left: 2px solid var(--text-muted);
}

.callout svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #fff;
}

.callout-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

/* Two-column layout grid for boundaries */
.boundaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.boundary-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 32px;
}

.boundary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 24px;
}

.boundary-header.does svg { stroke: #fff; }
.boundary-header.does-not svg { stroke: var(--text-muted); }

.boundary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.boundary-item {
  display: flex;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.boundary-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 4px;
  opacity: 0.7;
}

.boundary-header.does ~ .boundary-list svg { stroke: #fff; }
.boundary-header.does-not ~ .boundary-list svg { stroke: var(--text-muted); }

/* Animation keyframes */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 0px;
  }
  
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    background-color: var(--bg-dark);
  }
  
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.9);
  }
  
  .main-panel {
    margin-left: 0;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .content-viewport {
    padding: 32px 24px 80px;
  }
}

@media (max-width: 768px) {
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
