@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #09090b;
  --bg-card: rgba(24, 24, 27, 0.4);
  --accent-primary: #818cf8; /* Indigo 400 */
  --accent-secondary: #2dd4bf; /* Teal 400 */
  --accent-tertiary: #f472b6; /* Pink 400 */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

/* Reset & Base */
html {
  scroll-behavior: initial; /* Lenis handles smooth scrolling */
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

/* Lenis Smooth Scroll Recommended CSS */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Typography Enhancements */
.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-nav {
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cards & Interactions */
.project-card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.3);
}

.project-card .img-container {
  overflow: hidden;
  border-radius: 0.5rem;
}

.project-card img {
  transition: transform 0.6s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #6366f1 100%);
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-main);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

/* Skill Bars */
.skill-bar-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  height: 6px;
  overflow: hidden;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 9999px;
  position: relative;
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
  opacity: 0.3;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
  z-index: 1;
}

/* Contact Form Inputs */
.input-field {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

/* Utilities */
.section-heading {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Custom Selection */
::selection {
  background: rgba(129, 140, 248, 0.3);
  color: white;
}

/* Ambient Background Blobs */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}
.bg-blob-1 {
  background: var(--accent-primary);
}
.bg-blob-2 {
  background: var(--accent-secondary);
}
.bg-blob-3 {
  background: var(--accent-tertiary);
}

/* Custom Cursor */
@media (pointer: fine) {
  body {
    cursor: none;
  }
  
  a, button, input, textarea, .proj-item, .cursor-pointer, .glass-panel {
    cursor: none;
  }

  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--text-main);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, background 0.3s;
  }

  .custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
  }
  
  .custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    mix-blend-mode: normal;
    border: 1px solid rgba(255, 255, 255, 0.5);
  }
  
  .custom-cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: transparent;
    background: rgba(129, 140, 248, 0.1);
  }
}

/* Interactive Spotlight */
#spotlight-blob {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
  opacity: 0;
}

/* Magnetic Button Wrapper */
.magnetic-btn {
  display: inline-block;
}

/* Infinite Marquee */
.marquee-container {
  overflow: hidden;
  user-select: none;
}
.marquee-content {
  display: flex;
}
.marquee-part {
  flex-shrink: 0;
  animation: scroll-marquee 25s linear infinite;
}
.marquee-container:hover .marquee-part {
  animation-play-state: paused;
}
@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}