/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Roboto+Mono:wght@400;500&family=VT323&display=swap');

/* Base Reset and Variables */
:root {
  --primary-color: #00ff88;
  --primary-dark: #00cc6a;
  --primary-glow: rgba(0, 255, 136, 0.15);
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --bg-sidebar: #0d0d0d;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --border-color: #1a1a1a;
  --code-bg: #111111;
  --success-color: #00ff88;
  --warning-color: #ffaa00;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

/* Navigation */
.navbar {
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-family: 'VT323', monospace;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
}

.nav-brand:hover {
  color: var(--text-primary);
}

.nav-logo {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  border-bottom-color: var(--primary-color);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
}

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

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Sections */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Project Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
  width: 100%;
  height: 180px;
  background-color: var(--code-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  margin-bottom: 0.5rem;
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.25rem 0.75rem;
  background-color: var(--code-bg);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.footer-contact {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-contact a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-divider {
  margin: 0 1rem;
  color: var(--border-color);
}

/* Documentation Layout */
.docs-layout {
  display: flex;
  padding-top: 60px;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 1.5rem 0;
  transition: transform 0.3s;
}

.sidebar-header {
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.sidebar-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sidebar-search {
  padding: 0 1rem 1rem;
}

.sidebar-search input {
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.sidebar-search input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.sidebar-search input::placeholder {
  color: var(--text-muted);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.sidebar-section-title:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-section-title.active {
  color: var(--primary-color);
}

.sidebar-section-title .chevron {
  transition: transform 0.2s;
  font-size: 0.7rem;
}

.sidebar-section.expanded .chevron {
  transform: rotate(90deg);
}

.sidebar-subsections {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.sidebar-section.expanded .sidebar-subsections {
  max-height: 500px;
}

.sidebar-subsections a {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.sidebar-subsections a:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.sidebar-subsections a.active {
  color: var(--primary-color);
  background-color: var(--primary-glow);
  border-left: 3px solid var(--primary-color);
  padding-left: calc(2.5rem - 3px);
}

/* Main Documentation Content */
.docs-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem 3rem;
  max-width: calc(100% - 280px);
}

.docs-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.docs-content h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.docs-content h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.docs-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.docs-content ul,
.docs-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.docs-content li {
  margin-bottom: 0.5rem;
}

.docs-content code {
  background-color: var(--code-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9em;
  color: var(--primary-color);
}

.docs-content pre {
  background-color: var(--code-bg);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.docs-content pre code {
  padding: 0;
  background: none;
  color: var(--text-primary);
}

.docs-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Tables */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.docs-content th,
.docs-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.docs-content th {
  background-color: var(--code-bg);
  font-weight: 600;
}

.docs-content td {
  color: var(--text-secondary);
}

/* Info boxes */
.info-box {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.info-box.note {
  background-color: var(--primary-glow);
  border-left-color: var(--primary-color);
}

.info-box.warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-left-color: var(--warning-color);
}

.info-box.tip {
  background-color: var(--primary-glow);
  border-left-color: var(--success-color);
}

.info-box strong {
  display: block;
  margin-bottom: 0.5rem;
}

/* Function documentation */
.function-doc {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.function-doc h4 {
  color: var(--primary-color);
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 1rem;
}

.function-doc .params {
  margin-bottom: 0.5rem;
}

.function-doc .params strong {
  color: var(--text-primary);
}

/* Contact Page */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.contact-form {
  background-color: var(--bg-darker);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .docs-content {
    margin-left: 0;
    max-width: 100%;
    padding: 2rem 1.5rem;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-darker);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 1rem;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .docs-content h1 {
    font-size: 1.75rem;
  }

  .docs-content h2 {
    font-size: 1.4rem;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
