/* Base Styling Variables */
:root {
  --color-bg: #0b0f19;
  --color-bg-darker: #05070c;
  --color-card-bg: rgba(30, 41, 59, 0.4);
  --color-card-border: rgba(255, 255, 255, 0.08);
  --color-card-hover-border: rgba(139, 92, 246, 0.4);
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  
  /* Accent Colors */
  --color-primary: #8b5cf6;
  --color-primary-glow: rgba(139, 92, 246, 0.15);
  --color-cyan: #06b6d4;
  --color-cyan-glow: rgba(6, 182, 212, 0.15);
  --color-hf-yellow: #ffb800;
  --color-success: #10b981;
  --color-danger: #ef4444;
  
  /* Font Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

code {
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e2e8f0;
}

/* Background Gradients & Effects */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  opacity: 0.4;
  pointer-events: none;
}

.bg-glow-1 {
  top: 10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
}

.bg-glow-2 {
  top: 45%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  pointer-events: none;
}

/* Gradient Text Utilities */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-hf {
  background: linear-gradient(135deg, var(--color-hf-yellow) 0%, #ff8b00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

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

.btn-block {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-card-border);
  height: 70px;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--color-cyan);
}

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

.author-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.05);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.05);
  transition: var(--transition-fast);
}

.author-badge:hover {
  border-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
  color: #fff;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

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

.nav-btn {
  text-decoration: none;
  color: #0b0f19;
  background-color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background-color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem 0;
  text-align: center;
  position: relative;
}

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

.badge-container {
  margin-bottom: 1.5rem;
}

.hero-badge {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

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

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin-bottom: 2.5rem;
}

.hero-subtitle-emphasis {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: #fff;
  background: rgba(139, 92, 246, 0.1);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-weight: 500;
}

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

.hero-image-wrapper {
  max-width: 850px;
  width: 90%;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 20px;
  padding: 0.6rem;
  margin-bottom: 4rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 50px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(12px);
  transition: var(--transition-normal);
}

.hero-image-wrapper:hover {
  transform: translateY(-5px);
  border-color: var(--color-card-hover-border);
  box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.6), 0 0 60px rgba(139, 92, 246, 0.25);
}

.hero-image-wrapper img {
  width: 100%;
  border-radius: 14px;
  display: block;
  object-fit: cover;
}

.hero-image-badge {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-align: center;
  border-top: 1px solid var(--color-card-border);
  margin-top: 0.6rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 14px 14px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: rgba(30, 41, 59, 0.25);
  border: 1px solid var(--color-card-border);
  backdrop-filter: blur(8px);
  padding: 1.2rem 3rem;
  border-radius: 100px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

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

.stat-divider {
  width: 1px;
  height: 30px;
  background-color: var(--color-card-border);
}

/* Steps Section Styling */
.steps-section {
  padding: 6rem 0;
  position: relative;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  position: relative;
}

/* Step Card Layout */
.step-card-wrapper {
  display: flex;
  align-items: center;
  gap: 4rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.step-card-wrapper:hover {
  transform: translateY(-5px);
  border-color: var(--color-card-hover-border);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.1);
}

.step-card-wrapper.reverse {
  flex-direction: row-reverse;
}

.step-content-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.step-image-col {
  flex: 1.2;
  width: 100%;
}

.step-badge {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.step-description {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.step-tip {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--color-cyan);
  padding: 0.8rem 1.2rem;
  border-radius: 0 12px 12px 0;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Image Hover & Overlays */
.image-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background-color: var(--color-bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-slow);
}

.image-container:hover img {
  transform: scale(1.03);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: var(--transition-normal);
  backdrop-filter: blur(2px);
}

.image-container:hover .image-overlay {
  opacity: 1;
}

.overlay-icon {
  font-size: 2rem;
}

.overlay-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.5px;
}

/* Terminal Section & Step 12/13 */
.terminal-section {
  padding: 6rem 0;
  background-color: var(--color-bg-darker);
  position: relative;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.step-no-img-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--color-card-border);
  border-radius: 24px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}

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

.step-badge-mini {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-cyan) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.step-no-img-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.card-desc {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* Terminal Mockup */
.terminal-mock {
  background-color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  margin-top: auto;
}

.terminal-header {
  background-color: #1e293b;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

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

.terminal-title {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.2rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.terminal-line {
  color: #e2e8f0;
  word-break: break-all;
}

.t-prompt {
  color: var(--color-cyan);
  font-weight: bold;
}

.t-system {
  color: #64748b;
}

.t-success {
  color: #34d399;
}

/* Step 13 Congrats Box */
.success-card {
  border-color: rgba(16, 185, 129, 0.2);
}

.success-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.congrats-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
}

.congrats-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.congrats-box h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.congrats-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  background-color: #05070c;
  padding: 3rem 0;
  border-top: 1px solid var(--color-card-border);
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.2);
}

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

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(15px);
}

.lightbox-container {
  position: relative;
  width: 90%;
  max-width: 1100px;
  height: 80vh;
  background: #0f172a;
  border: 1px solid var(--color-card-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1005;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.lightbox-content {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Modal Left: Image Side */
.lightbox-image-side {
  flex: 1.4;
  height: 100%;
  background-color: var(--color-bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  border-right: 1px solid var(--color-card-border);
}

.lightbox-image-side img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Navigation arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 1002;
  user-select: none;
}

.lightbox-nav:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.nav-prev {
  left: 1.5rem;
}

.nav-next {
  right: 1.5rem;
}

/* Modal Right: Text Info Side */
.lightbox-info-side {
  flex: 1;
  height: 100%;
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.lightbox-step-badge {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.lightbox-step-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
}

.lightbox-step-desc-container {
  flex-grow: 1;
  margin-bottom: 2rem;
}

.lightbox-step-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.lightbox-step-desc code {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.lightbox-step-tip {
  background: rgba(6, 182, 212, 0.05);
  border-left: 3px solid var(--color-cyan);
  padding: 1rem 1.2rem;
  border-radius: 0 12px 12px 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

/* Modal Bottom Navigation Controls */
.lightbox-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-card-border);
  padding-top: 1.5rem;
  margin-top: auto;
}

.lightbox-progress-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-weight: 600;
}

.lightbox-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition-fast);
}

.dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }
  
  .step-card-wrapper {
    flex-direction: column !important;
    gap: 2rem;
    padding: 2rem;
  }
  
  .step-image-col {
    order: 2;
  }
  
  .step-content-col {
    order: 1;
  }
  
  .split-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .lightbox-container {
    height: 90vh;
    width: 95%;
  }
  
  .lightbox-content {
    flex-direction: column;
  }
  
  .lightbox-image-side {
    flex: 1;
    border-right: none;
    border-bottom: 1px solid var(--color-card-border);
  }
  
  .lightbox-info-side {
    flex: 1.2;
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }
  
  .navbar {
    height: 60px;
  }
  
  .nav-links {
    display: none; /* simple hidden navigation for mobile */
  }
  
  .hero {
    padding: 4rem 0 2rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 20px;
    width: 100%;
  }
  
  .stat-divider {
    width: 80%;
    height: 1px;
  }
  
  .step-title {
    font-size: 1.3rem;
  }
  
  .step-description {
    font-size: 0.95rem;
  }
  
  .lightbox-info-side {
    padding: 1.5rem;
  }
  
  .lightbox-step-title {
    font-size: 1.3rem;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}
