/* Global theme variables and base styles */
:root {
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --bg-start: #0f172a; /* slate-900 */
  --bg-end: #1e293b; /* slate-800 */
  --text: #f8fafc; /* slate-50 */
  --muted: #cbd5e1; /* slate-300 */
}

/* Light theme overrides */
.light {
  --bg-start: #f8fafc;
  --bg-end: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  overflow-x: hidden;
  font-family: "Poppins", "Plus Jakarta Sans", system-ui, -apple-system,
    Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Decorative liquid blobs */
.liquid-shape {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* Glassmorphism card */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.4);
}

/* Project card 3D hover and CTA */
.project-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.5s ease;
  position: relative;
}

.project-card:hover {
  transform: perspective(1000px) rotateY(10deg) rotateX(5deg) scale(1.03);
}

.project-card::after {
  content: "View project →";
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(99, 102, 241, 0.9);
  color: #fff;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.project-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.project-media img {
  transition: transform 0.6s ease;
}
.project-card:hover .project-media img {
  transform: scale(1.05);
}

/* Skill bubbles */
.skill-bubble {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.45);
  transition: transform 0.25s ease, background 0.25s ease;
}

.skill-bubble:hover {
  background: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px) scale(1.06);
}

/* Nav underline hover */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Hackathon badge pulse */
.hackathon-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
.hackathon-badge::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  z-index: -1;
  opacity: 0.5;
  animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

/* Section angled divider */
.section-angled {
  position: relative;
}
.section-angled::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(139, 92, 246, 0.15)
  );
  transform: skewY(-3deg);
  z-index: -1;
  filter: blur(10px);
}

/* Reveal-on-scroll utility (IntersectionObserver toggles .is-visible) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Theme toggle icon alignment */
#theme-toggle {
  color: var(--text);
}
