:root {
  --bg-light: #f5f7fb;
  --bg-dark: #0f172a;
  --text-light: #0f172a;
  --text-dark: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #22c55e;
  --card-bg-light: #ffffff;
  --card-bg-dark: #111827;
  --border-radius: 10px;
  --transition: 0.3s ease;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg-light);
  color: var(--text-light);
  transition: background var(--transition), color var(--transition);
}

body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  transition: background var(--transition), border-color var(--transition);
}

body.dark header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom-color: rgba(51, 65, 85, 0.7);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
}

.site-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.1rem;
}

.site-sub {
  font-size: 0.75rem;
  color: #64748b;
}

body.dark .site-sub {
  color: #94a3b8;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.menu {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.menu a {
  position: relative;
  padding-bottom: 0.2rem;
  color: #475569;
  font-weight: 500;
}

body.dark .menu a {
  color: #cbd5f5;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width var(--transition);
}

.menu a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */

.btn {
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: white;
  color: #0f172a;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.btn:hover {
  background: #e5edff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

body.dark .btn {
  background: #0b1220;
  color: #e5e7eb;
  border-color: #334155;
}

body.dark .btn:hover {
  background: #111827;
}

/* Dark mode toggle */

.dark-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  cursor: pointer;
  background: rgba(248, 250, 252, 0.8);
}

body.dark .dark-toggle {
  background: rgba(15, 23, 42, 0.9);
  border-color: #334155;
  color: #e5e7eb;
}

.dark-toggle-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f172a;
}

body.dark .dark-toggle-circle {
  background: #e5e7eb;
}

/* Hero section */

.hero {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 2.5rem 1.5rem 2.2rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 600;
}

.hero-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.22);
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: linear-gradient(135deg, #2563eb, #22c55e);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 430px;
}

body.dark .hero-sub {
  color: #cbd5f5;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.4rem;
}

.hero-note-pill {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #166534;
  font-weight: 500;
  font-size: 0.75rem;
}

body.dark .hero-note {
  color: #9ca3af;
}

body.dark .hero-note-pill {
  background: rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
}

/* Hero typing demo */

.hero-right {
  display: flex;
  justify-content: center;
}

.typing-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg-light);
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
}

body.dark .typing-card {
  background: var(--card-bg-dark);
  border-color: #1f2937;
}

.typing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
}

body.dark .typing-header {
  color: #9ca3af;
}

.typing-dot-row {
  display: flex;
  gap: 4px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
}

.dot:nth-child(1) {
  background: #f97373;
}

.dot:nth-child(2) {
  background: #facc15;
}

.dot:nth-child(3) {
  background: #4ade80;
}

.typing-body {
  padding: 0.6rem 0.5rem;
  border-radius: 12px;
  background: #0f172a;
  color: #e5e7eb;
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.85rem;
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1rem;
  margin-left: 2px;
  background: #22c55e;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

.typing-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  font-size: 0.75rem;
}

.stat-pill {
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

body.dark .stat-pill {
  background: #020617;
  border-color: #1e293b;
}

.stat-label {
  color: #6b7280;
}

body.dark .stat-label {
  color: #9ca3af;
}

.stat-value {
  font-weight: 700;
  color: #0f172a;
}

body.dark .stat-value {
  color: #e5e7eb;
}

/* Stats section */

.stats-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  border-radius: 14px;
  background: var(--card-bg-light);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.9rem 0.9rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

body.dark .stat-card {
  background: var(--card-bg-dark);
  border-color: #1e293b;
}

.stat-number {
  font-size: 1.1rem;
  font-weight: 700;
}

.stat-text {
  font-size: 0.8rem;
  color: #6b7280;
}

body.dark .stat-text {
  color: #9ca3af;
}

/* Footer */

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.2rem 1.5rem 1.3rem;
  margin-top: 0.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6b7280;
}

body.dark footer {
  border-top-color: #1e293b;
}

body.dark .footer-inner {
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: inherit;
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .nav-center {
    display: none; /* simple, later hamburger menu bana sakte ho */
  }

  .hero {
    padding-top: 1.8rem;
  }
}

@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-container {
    padding-inline: 1rem;
  }
}