/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: #080808;
  color: #f0f0f0;
  margin: 0;
}

/* Grid background */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Glow orbs */
.glow-orb-1 {
  position: absolute;
  top: 25%;
  left: 33%;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  background: rgba(124, 58, 237, 0.12);
  filter: blur(64px);
  animation: pulse 4s ease-in-out infinite;
}
.glow-orb-2 {
  position: absolute;
  bottom: 25%;
  right: 33%;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  background: rgba(124, 58, 237, 0.07);
  filter: blur(80px);
  animation: pulse 4s ease-in-out infinite 1s;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Fade/slide in animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.from-left {
  transform: translateX(-32px);
}
.animate-on-scroll.from-left.visible {
  transform: translateX(0);
}
.animate-on-scroll.from-right {
  transform: translateX(32px);
}
.animate-on-scroll.from-right.visible {
  transform: translateX(0);
}

/* Scroll arrow bounce */
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.bounce-down { animation: bounce-down 1.5s ease-in-out infinite; }

/* Skill bar */
.skill-bar-fill {
  width: 0%;
  transition: width 1.2s ease-out;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 9999px;
}

/* Timeline dot pulse */
.timeline-dot {
  width: 12px;
  height: 12px;
  background: #7c3aed;
  border-radius: 9999px;
  position: absolute;
  left: -6px;
  top: 24px;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.3);
}

/* Card hover */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.08);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
}

/* Navbar glassmorphism */
#navbar.scrolled {
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Primary button */
.btn-primary {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 4px 24px rgba(124,58,237,0.3);
}
.btn-primary:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 6px 32px rgba(124,58,237,0.4);
}

.btn-outline {
  background: transparent;
  color: #f0f0f0;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 11px 28px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-outline:hover {
  border-color: rgba(124,58,237,0.6);
  background: rgba(124,58,237,0.07);
  transform: translateY(-1px);
}

/* Project thumbnail hover */
.project-thumb {
  overflow: hidden;
  position: relative;
}
.project-thumb img {
  transition: transform 0.5s ease;
}
.project-card:hover .project-thumb img {
  transform: scale(1.05);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  gap: 8px;
}
.project-card:hover .project-overlay {
  opacity: 1;
}

/* Form inputs */
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 10px 14px;
  color: #f0f0f0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: rgba(124,58,237,0.6);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
textarea.form-input { resize: none; }

/* Monospace label */
.label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Section divider */
.section-divider {
  width: 64px;
  height: 2px;
  background: #7c3aed;
  border-radius: 9999px;
  margin: 24px auto 0;
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: #7c3aed;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}
#back-to-top:hover { background: #6d28d9; }

/* Testimonial stars */
.star { color: #7c3aed; }

/* Cursor blink */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.cursor { animation: blink 1s step-end infinite; }

/* Toast */
#toast {
  position: fixed;
  bottom: 80px;
  right: 32px;
  z-index: 1000;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translateY(0);
}
#toast.success { background: #14532d; color: #86efac; border: 1px solid #166534; }
#toast.error { background: #7f1d1d; color: #fca5a5; border: 1px solid #991b1b; }

/* Mobile menu */
#mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px;
}
#mobile-menu.open { display: flex; flex-direction: column; gap: 8px; }

/* Image placeholder */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(167,139,250,0.1));
  font-family: 'Space Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  color: rgba(124,58,237,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .desktop-nav { display: none !important; }
  .mobile-toggle { display: flex !important; }
}
@media (min-width: 769px) {
  .mobile-toggle { display: none !important; }
  .desktop-nav { display: flex !important; }
}
