/* ==========================================
   BASE & GLOBAL STYLES
========================================== */
* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #22c55e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #16a34a; }

/* ==========================================
   GRADIENT TEXT
========================================== */
.gradient-text {
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   GLASSMORPHISM
========================================== */
.glass {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

/* ==========================================
   SECTION REVEAL (Intersection Observer)
========================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   NAVIGATION LINK UNDERLINE
========================================== */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #06b6d4);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ==========================================
   TIMELINE GRADIENT LINE
========================================== */
.timeline-line {
  background: linear-gradient(180deg, #22c55e 0%, #06b6d4 50%, #818cf8 100%);
}

/* ==========================================
   PROJECT CARD HOVER
========================================== */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover { transform: translateY(-6px); }

/* ==========================================
   TECH BADGE HOVER
========================================== */
.tech-badge { transition: transform 0.2s ease; }
.tech-badge:hover { transform: translateY(-4px) scale(1.05); }

/* ==========================================
   ALPINE.JS CLOAK
========================================== */
[x-cloak] { display: none !important; }

/* ==========================================
   FORM FOCUS RING
========================================== */
.form-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

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

/* ==========================================
   GRID DOT PATTERN BACKGROUND
========================================== */
.grid-pattern {
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.dark .grid-pattern {
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.08) 1px, transparent 1px);
}

/* ==========================================
   AVATAR GLOW RING ANIMATION
========================================== */
@keyframes ring-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.08); opacity: 0.3; }
}
.avatar-ring { animation: ring-pulse 3s ease-in-out infinite; }

/* ==========================================
   PROJECT FILTER BUTTON (active state)
========================================== */
.filter-btn.active {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  color: white;
}

/* ==========================================
   BLOG CARD BOTTOM HOVER LINE
========================================== */
.blog-card-line {
  transition: width 0.3s ease;
  width: 0;
}
.blog-card:hover .blog-card-line { width: 100%; }
