/* ============================================================
   KITHUB — MAIN / LANDING PAGE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-canvas:       #0d1117;
  --bg-overlay:      #161b22;
  --bg-subtle:       #1c2128;
  --bg-hover:        #21262d;

  --border-default:  #30363d;
  --border-muted:    #21262d;

  --text-primary:    #e6edf3;
  --text-secondary:  #8b949e;
  --text-muted:      #6e7681;

  --green-500: #3fb950;
  --green-400: #2ea043;
  --green-bg:  rgba(63, 185, 80, 0.1);
  --green-border: rgba(63, 185, 80, 0.25);

  --amber-500: #e3b341;
  --blue-500:  #58a6ff;
  --red-500:   #f85149;

  --font-main: 'Sora', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-h: 60px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-default);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  white-space: nowrap;
}

.logo svg { color: var(--green-500); flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-400);
  color: #fff;
  border: 1px solid rgba(240,246,252,0.1);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-main);
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-launch:hover { background: #26a641; }
.btn-launch:active { transform: scale(0.98); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Subtle dot grid */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.25;
}

.glow-1 {
  width: 600px; height: 400px;
  background: radial-gradient(circle, #1a7f37 0%, transparent 70%);
  top: 0; left: 50%;
  transform: translateX(-60%);
  animation: glow-float 8s ease-in-out infinite;
}

.glow-2 {
  width: 400px; height: 300px;
  background: radial-gradient(circle, #0d419d 0%, transparent 70%);
  top: 40%; right: 5%;
  animation: glow-float 10s ease-in-out infinite reverse;
}

@keyframes glow-float {
  0%, 100% { transform: translateY(0) translateX(-60%); }
  50%       { transform: translateY(-30px) translateX(-60%); }
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--green-500);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 6px var(--green-500);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.title-accent {
  background: linear-gradient(90deg, var(--green-500) 0%, var(--blue-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-400);
  color: #fff;
  border: 1px solid rgba(240,246,252,0.1);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary-lg:hover { background: #26a641; transform: translateY(-1px); }
.btn-primary-lg:active { transform: scale(0.98); }

.btn-ghost-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-ghost-lg:hover { background: var(--bg-hover); color: var(--text-primary); border-color: #8b949e; }

/* ============================================================
   TERMINAL
   ============================================================ */

.terminal {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  text-align: left;
  animation: fadeUp 0.6s 0.4s ease both;
}

.terminal-bar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-muted);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}

.dot.red    { background: #ff5f57; }
.dot.amber  { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
}

.t-line {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  animation-delay: var(--d, 0s);
}

.t-dim    { color: var(--text-muted); }
.t-cmd    { color: var(--text-primary); }
.t-green  { color: var(--green-500); }
.t-amber  { color: var(--amber-500); }
.t-blue   { color: var(--blue-500); }

.t-cursor {
  display: inline-block;
  color: var(--green-500);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   STATS BAR
   ============================================================ */

.stats-bar {
  border-top: 1px solid var(--border-muted);
  border-bottom: 1px solid var(--border-muted);
  background: var(--bg-overlay);
}

.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 48px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

.stat-div {
  width: 1px;
  height: 36px;
  background: var(--border-default);
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green-500);
  border: 1px solid var(--green-border);
  background: var(--green-bg);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 52px;
  line-height: 1.7;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */

.features {
  padding: 96px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
  animation: fadeUp 0.5s calc(var(--i, 0) * 80ms) ease both;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 185, 80, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.feature-card:hover {
  border-color: rgba(63, 185, 80, 0.5);
  transform: translateY(-3px);
}

.feature-card:hover::before { opacity: 1; }

.feature-card.featured {
  border-color: rgba(63, 185, 80, 0.4);
  background: linear-gradient(135deg, rgba(35,134,54,0.08) 0%, var(--bg-overlay) 50%);
}

.feature-badge {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--green-500);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 20px;
  padding: 3px 10px;
}

.feature-icon {
  width: 44px; height: 44px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  margin-bottom: 18px;
  transition: color 0.2s, border-color 0.2s;
}

.feature-icon.green { background: var(--green-bg); border-color: var(--green-border); color: var(--green-500); }
.feature-card:hover .feature-icon { color: var(--green-500); border-color: var(--green-border); }

.feature-card h3 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.feature-footer { display: flex; gap: 6px; flex-wrap: wrap; }

.feature-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-canvas);
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  padding: 3px 8px;
}

.feature-tag.green { color: var(--green-500); background: var(--green-bg); border-color: var(--green-border); }

/* ============================================================
   HOW TO USE — STEPS
   ============================================================ */

.howto {
  padding: 96px 0;
  border-top: 1px solid var(--border-muted);
  background: var(--bg-subtle);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 52px;
}

.step {
  flex: 1;
  min-width: 220px;
  animation: fadeUp 0.5s calc(var(--i,0) * 100ms) ease both;
}

.step-connector {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-default), transparent);
  margin-top: 28px;
  flex-shrink: 0;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: rgba(63, 185, 80, 0.25);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}

.step-content h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 240px;
}

/* ============================================================
   DEVELOPER SECTION
   ============================================================ */

.developer {
  padding: 96px 0;
  border-top: 1px solid var(--border-muted);
}

.dev-card {
  margin-top: 48px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  gap: 0;
  position: relative;
}

.dev-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Profile left */
.dev-profile {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 260px;
  gap: 20px;
  position: relative;
}

.dev-avatar {
  position: relative;
  width: 100px;
  height: 100px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--green-500), var(--blue-500)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}

.dev-info { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.dev-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.dev-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  padding: 5px 12px;
}

.dev-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

.dev-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-canvas);
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  padding: 3px 8px;
}

/* Divider */
.dev-divider {
  width: 1px;
  background: var(--border-default);
  flex-shrink: 0;
  margin: 24px 0;
}

/* Right: quote + links */
.dev-right {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

.dev-quote {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--green-500);
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 64px;
  color: rgba(63, 185, 80, 0.15);
  line-height: 0.6;
  margin-bottom: 12px;
  user-select: none;
}

.dev-quote p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 16px;
}

.quote-footer {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.dev-links { display: flex; gap: 10px; flex-wrap: wrap; }

.dev-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-main);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dev-link-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: #8b949e; }

/* ============================================================
   CTA
   ============================================================ */

.cta {
  padding: 100px 0;
  border-top: 1px solid var(--border-muted);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 600px; height: 300px;
  background: radial-gradient(circle, rgba(35,134,54,0.15) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-inner { position: relative; z-index: 1; }

.cta-title {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.cta-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  border-top: 1px solid var(--border-default);
  background: var(--bg-overlay);
  padding: 24px 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 16px; }

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 4px; }

.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.footer-link:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 48px); }
  .stats-inner { gap: 0; }
  .stat-item { padding: 12px 24px; }
  .stat-div { height: 24px; }
  .steps { flex-direction: column; gap: 32px; }
  .step-connector { display: none; }
  .dev-card { flex-direction: column; }
  .dev-divider { width: auto; height: 1px; margin: 0 24px; }
  .dev-profile { padding: 32px 24px 24px; }
  .dev-right { padding: 24px 24px 32px; }
  .step-content p { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: -1px; }
  .hero-inner, .section-inner { padding: 0 16px; }
  .section-title { letter-spacing: -0.5px; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}