/* =========================================
   GLOBAL STYLES - AppMinds TP1
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg:        #0c0c18;
  --bg-2:      #12122a;
  --bg-card:   #161628;
  --border:    #2a2a4a;
  --purple:    #7c3aed;
  --purple-light: #a855f7;
  --purple-glow: rgba(124, 58, 237, 0.25);
  --pink:      #ec4899;
  --cyan:      #22d3ee;
  --text:      #e2e2f0;
  --text-muted:#8888aa;
  --white:     #ffffff;
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'DM Sans', sans-serif;
  --radius:    12px;
  --radius-sm: 8px;
  --radius-pill: 50px;
  --transition: 0.25s ease;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-purple: 0 0 30px rgba(124, 58, 237, 0.3);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(12, 12, 24, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.nav-logo .accent { color: var(--purple-light); }
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--purple-light);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a.active::after,
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover {
  border-color: var(--purple);
  color: var(--text);
}

/* ---- Tags / Pills ---- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--purple-light);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 400;
}

/* ---- Section header ---- */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--purple-light);
  margin-bottom: 0.5rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- Footer ---- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a:hover { color: var(--purple-light); }

/* ---- Accent color ---- */
.accent { color: var(--purple-light); }

/* ---- Hidden util ---- */
.hidden { display: none !important; }

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1.5rem 2rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--purple-light); }

/* =========================================
   RESPONSIVE
   ========================================= */

/* Mobile small — 400px */
@media (max-width: 400px) {
  .navbar { padding: 0.75rem 1rem; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* Tablet — 900px */
@media (max-width: 900px) {
  .nav-links { gap: 1.25rem; }
  .nav-toggle { display: flex; }
}

/* Desktop — 1200px and up */
@media (min-width: 1200px) {
  .navbar { padding: 1rem 4rem; }
  .footer { padding: 1.5rem 4rem; }
}

/* Mobile nav open state */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  gap: 1rem;
}
