/* CSS Reset and Variables */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* HSL Tailored Color Palette */
  --bg-main: hsl(224, 71%, 4%);
  --bg-surface: hsl(222, 47%, 10%);
  --bg-surface-glass: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(168, 85, 247, 0.25);
  
  --text-primary: hsl(0, 0%, 98%);
  --text-secondary: hsl(215, 25%, 72%);
  --text-muted: hsl(215, 16%, 57%);
  
  --accent-purple: hsl(263, 90%, 65%);
  --accent-blue: hsl(217, 91%, 60%);
  --accent-green: hsl(150, 84%, 44%);
  --accent-orange: hsl(35, 92%, 58%);
  --accent-cyan: hsl(188, 86%, 53%);
  --accent-pink: hsl(330, 85%, 60%);
  
  --gradient-purple-blue: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  --gradient-dark: linear-gradient(180deg, var(--bg-main) 0%, hsl(222, 50%, 6%) 100%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  background-image: var(--gradient-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Helpers & Typography */
.text-gradient {
  background: var(--gradient-purple-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.c-gray { color: var(--text-muted); }
.c-green { color: var(--accent-green); }
.c-yellow { color: var(--accent-orange); }
.c-purple { color: var(--accent-purple); }
.c-cyan { color: var(--accent-cyan); }
.c-blue { color: var(--accent-blue); }

/* Buttons & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-heading);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--accent-purple);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-purple-blue);
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5), var(--shadow-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism */
.glass {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

/* Background Glow Orbs */
.glow-orb {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}

.glow-orb-1 {
  top: 10%;
  left: 5%;
  background: var(--accent-purple);
}

.glow-orb-2 {
  top: 25%;
  right: 5%;
  background: var(--accent-blue);
}

.glow-orb-3 {
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-purple);
  width: 600px;
  height: 600px;
  opacity: 0.1;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: 70px;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.logo-icon {
  background: var(--gradient-purple-blue);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.nav-btn {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 10;
}

.hero-content {
  text-align: left;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Console / Shell Preview */
.hero-preview {
  display: flex;
  justify-content: center;
}

.preview-card {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.preview-card:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.card-header {
  background: rgba(10, 15, 30, 0.6);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.dots {
  display: flex;
  gap: 0.35rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.tab-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 1.5rem;
}

.card-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(8, 12, 24, 0.7);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.line {
  word-break: break-all;
}

/* Sections General */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 2rem;
  position: relative;
  z-index: 10;
}

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

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Interactive Tabs Component */
.tabs-container {
  margin-top: 2rem;
}

.tabs-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1px;
}

.tab-btn {
  background: none;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.tab-btn.active {
  color: var(--accent-purple);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-purple-blue);
  border-radius: 2px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.panel-info h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin: 1rem 0 1.5rem;
}

.panel-info p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.panel-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
}

.feature-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.check-icon {
  color: var(--accent-green);
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

.feature-checklist strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.feature-checklist div {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-checklist code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.panel-graphic {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.feature-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Architecture Section Styling */
.arch-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.arch-visual-wrapper {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.arch-svg {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.svg-node {
  transition: transform 0.3s ease, fill 0.3s ease;
}

.svg-node:hover {
  transform: scale(1.02);
  fill: rgba(15, 23, 42, 0.8);
}

.lifecycle-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lifecycle-timeline h4 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-left: 2px solid var(--border-color);
  padding-left: 1.5rem;
}

.timeline-step {
  position: relative;
}

.step-num {
  position: absolute;
  left: -2.15rem;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-purple-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.timeline-step strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

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

/* Installation & Code Snippet Controls */
.setup-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.setup-steps h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.setup-step-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.setup-step-item:last-child {
  margin-bottom: 0;
}

.step-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 1rem;
  flex-shrink: 0;
}

.setup-step-item h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.setup-step-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.setup-code {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.code-tabs {
  background: rgba(10, 15, 30, 0.6);
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.code-tab {
  background: none;
  border: none;
  outline: none;
  padding: 1rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-right: 1px solid var(--border-color);
  transition: var(--transition);
}

.code-tab:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.code-tab.active {
  background: var(--bg-surface);
  color: var(--accent-purple);
  border-bottom: 2px solid var(--accent-purple);
}

.code-panel {
  display: none;
  background: rgba(8, 12, 24, 0.6);
  padding: 1.5rem;
}

.code-panel.active {
  display: block;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  outline: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.code-panel pre {
  margin: 0;
  overflow-x: auto;
}

.code-panel code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: hsl(210, 100%, 93%);
  white-space: pre;
}

/* Footer Styling */
.footer {
  background: rgba(8, 10, 20, 0.8);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 4rem;
  align-items: flex-start;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 440px;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 2rem 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive Grid / Media Queries */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .arch-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .setup-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .tab-btn {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
}
