/* ==========================================================================
   TechPulseCodeZone — Global Stylesheet
   Dark Minimalist Tech · Computer Science Aesthetic
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #05070d;
  --bg-secondary: #0a0e1a;
  --bg-tertiary: #0f1424;
  --bg-elevated: #141a2e;
  --surface: #1a2238;
  --border: rgba(0, 255, 200, 0.08);
  --border-strong: rgba(0, 255, 200, 0.2);
  --text-primary: #e6f1ff;
  --text-secondary: #8892b0;
  --text-muted: #495670;
  --accent-cyan: #00ffc8;
  --accent-blue: #4d8bff;
  --accent-purple: #b46cff;
  --accent-pink: #ff5d8f;
  --accent-orange: #ff9a3c;
  --accent-green: #34d399;
  --gradient-1: linear-gradient(135deg, #00ffc8 0%, #4d8bff 50%, #b46cff 100%);
  --gradient-2: linear-gradient(135deg, #4d8bff 0%, #b46cff 100%);
  --gradient-3: linear-gradient(135deg, #00ffc8 0%, #4d8bff 100%);
  --shadow-glow: 0 0 40px rgba(0, 255, 200, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 48px rgba(0, 255, 200, 0.2);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Animated Grid Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 200, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 200, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  animation: gridShift 30s linear infinite;
}

@keyframes gridShift {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* Scanline Effect */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 200, 0.015) 50%, transparent 100%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
  animation: scanlines 8s linear infinite;
  opacity: 0.4;
}

@keyframes scanlines {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

::selection {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

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

img,
svg {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}

.section-sm {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.section-header {
  margin-bottom: 64px;
  text-align: left;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: rgba(0, 255, 200, 0.04);
  margin-bottom: 20px;
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #8892b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title .accent {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.text-gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mono {
  font-family: var(--font-mono);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 7, 13, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(5, 7, 13, 0.95);
  border-bottom-color: var(--border-strong);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--gradient-1);
  position: relative;
  overflow: hidden;
}

.nav-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  border-radius: 7px;
  margin: 2px;
}

.nav-logo svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
}

.nav-brand-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.nav-brand-text span {
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color var(--transition-fast);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  border-radius: 1px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--gradient-1);
  color: var(--bg-primary);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  box-shadow: 0 0 0 0 rgba(0, 255, 200, 0);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 255, 200, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition-base);
  cursor: pointer;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: var(--bg-primary);
  box-shadow: 0 4px 24px rgba(0, 255, 200, 0.15);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition-fast);
  filter: blur(12px);
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 255, 200, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(0, 255, 200, 0.05);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--accent-cyan);
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 26, 46, 0.6) 0%, rgba(10, 14, 26, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all var(--transition-base);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(0, 255, 200, 0.06);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-cyan);
  transition: all var(--transition-base);
}

.card:hover .card-icon {
  background: rgba(0, 255, 200, 0.12);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.3);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 968px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 80px 0 32px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.footer-brand-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin: 16px 0 12px;
  color: var(--text-primary);
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 360px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-list a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-list a:hover {
  color: var(--accent-cyan);
}

.footer-list a::before {
  content: '›';
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition-fast);
  color: var(--accent-cyan);
}

.footer-list a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-bottom-links a:hover {
  color: var(--accent-cyan);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-6 { margin-bottom: 48px; }
.mb-8 { margin-bottom: 64px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }
.w-full { width: 100%; }
