/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #fafbfc;
  --bg-tertiary: #f6f8fa;
  --bg-code: #f6f8fa;
  --bg-code-header: #f1f3f4;
  --text-primary: #24292e;
  --text-secondary: #586069;
  --text-muted: #d1d5da;
  --border-primary: #e1e4e8;
  --border-secondary: #d1d5da;
  --accent-primary: #0366d6;
  --accent-secondary: #0256cc;
  --accent-danger: #d73a49;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --navbar-bg: #fff;
  --footer-bg: #24292e;
  --footer-text: #d1d5da;
}

[data-theme="dark"] {
  /* Dark mode colors */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-code: #161b22;
  --bg-code-header: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --border-primary: #30363d;
  --border-secondary: #21262d;
  --accent-primary: #58a6ff;
  --accent-secondary: #1f6feb;
  --accent-danger: #f85149;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --navbar-bg: #0d1117;
  --footer-bg: #010409;
  --footer-text: #8b949e;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-size: 16px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border-primary);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo-img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-primary);
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-secondary);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.theme-toggle-icon {
  font-size: 16px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 2px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  background: var(--bg-primary);
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--border-primary);
  transition: background-color 0.3s ease;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-description {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-block;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-secondary);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badges img {
  height: 20px;
}

/* Code blocks */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem 0;
  transition: background-color 0.3s ease;
}

.code-header {
  background: var(--bg-code-header);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-secondary);
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.code-title {
  color: var(--text-secondary);
  font-weight: 600;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.copy-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-secondary);
}

.code-block pre {
  padding: 16px;
  margin: 0;
  overflow-x: auto;
  background: var(--bg-code);
  transition: background-color 0.3s ease;
}

.code-block code {
  color: var(--text-primary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.45;
}

.code-inline code {
  background: var(--bg-tertiary);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--accent-danger);
  transition: background-color 0.3s ease;
}

/* Sections */
section {
  padding: 40px 0;
  transition: background-color 0.3s ease;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Installation Section */
.install-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.install-option {
  background: var(--bg-primary);
  padding: 1.5rem;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.install-option h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.install-option p {
  margin-bottom: 1rem;
  font-size: 14px;
}

.install-option ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.install-option li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 14px;
}

.install-tabs {
  margin-top: 1rem;
}

.tab-buttons {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-secondary);
}

.tab-button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-button.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

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

.tab-pane {
  display: none;
  margin-top: 1rem;
}

.tab-pane.active {
  display: block;
}

/* Development Section */
.development {
  background: var(--bg-primary);
}

.dev-options {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.dev-option {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.dev-option:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.dev-option.featured {
  border: 2px solid var(--accent-primary);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.dev-option.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.dev-option-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dev-option-header h3 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--text-primary);
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.recommended {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.codespaces-features ul {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.codespaces-features li {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.codespaces-cta {
  margin: 1.5rem 0;
  text-align: center;
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-icon {
  font-size: 1.2rem;
}

.quick-steps {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border-left: 4px solid var(--accent-primary);
}

.quick-steps h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.quick-steps ol {
  margin: 0;
  padding-left: 1.25rem;
}

.quick-steps li {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.dev-steps ol {
  padding-left: 1.25rem;
  margin: 1rem 0;
}

.dev-steps li {
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.dev-steps a {
  color: var(--accent-primary);
  text-decoration: none;
}

.dev-steps a:hover {
  text-decoration: underline;
}

.manual-setup-note {
  background: var(--bg-tertiary);
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dev-workflow {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-primary);
}

.workflow-commands {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.command-group h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .workflow-commands {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .dev-options {
    gap: 1.5rem;
  }
}

/* Usage Section */
.status-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  font-size: 14px;
}

[data-theme="dark"] .status-note {
  background: #332b00;
  border-color: #4d3800;
  color: #ffdf5d;
}

.current-capabilities ul {
  list-style: none;
  margin-top: 1rem;
}

.current-capabilities li {
  padding: 0.5rem 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Contributing Section */
.contrib-steps {
  margin-top: 2rem;
}

.contrib-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.step-number {
  background: var(--accent-primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.step-content p {
  font-size: 14px;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border-primary);
  transition: background-color 0.3s ease;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--text-muted);
  color: var(--footer-text);
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 60px;
    flex-direction: column;
    background-color: var(--navbar-bg);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px var(--shadow-light);
    padding: 1rem 0;
    border-top: 1px solid var(--border-primary);
  }

  .nav-menu.active {
    left: 0;
  }

  .theme-toggle {
    margin-top: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .tab-buttons {
    flex-direction: column;
  }

  .tab-button {
    border-bottom: 1px solid var(--border-secondary);
    border-right: none;
  }

  .tab-button.active {
    border-bottom-color: var(--border-secondary);
    background: var(--bg-tertiary);
  }

  .contrib-step {
    flex-direction: column;
    text-align: center;
  }

  .step-number {
    margin: 0 auto 1rem auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 70px 0 30px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  section {
    padding: 30px 0;
  }

  h2 {
    font-size: 1.5rem;
  }

  .install-option,
  .feature-card,
  .contrib-step,
  .dev-option {
    padding: 1rem;
  }

  .dev-option-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .dev-option-header h3 {
    font-size: 1.1rem;
  }

  .btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .workflow-commands {
    grid-template-columns: 1fr;
  }

  .code-block pre {
    padding: 12px;
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Accessibility - Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles for accessibility */
.theme-toggle:focus,
.btn:focus,
.nav-link:focus,
.copy-btn:focus,
.tab-button:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-secondary {
    background: var(--text-primary);
    color: var(--bg-primary);
  }

  .btn-outline {
    background: var(--text-primary);
    color: var(--bg-primary);
  }
}
