/* ============================================
   JARYAN.AI — Main CSS
   ============================================ */

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

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-blue: #2997FF;
  --accent-purple: #A855F7;
  --gradient: linear-gradient(135deg, #2997FF, #A855F7);
  --gradient-text: linear-gradient(135deg, #2997FF 0%, #A855F7 100%);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 8px 40px rgba(41, 151, 255, 0.15);
  --radius-card: 16px;
  --radius-btn: 50px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fafafa;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.06);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 40px rgba(41, 151, 255, 0.12);
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2997FF, #A855F7);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60b4ff, #c084fc);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ============================================
   GLASS MORPHISM
   ============================================ */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(41, 151, 255, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 31px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

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

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

/* ============================================
   SCROLL PROGRESS
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================
   PAGE TRANSITION
   ============================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}

.page-transition.enter {
  transform: translateY(0);
}

.page-transition.exit {
  transform: translateY(-100%);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.light-mode .navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(41, 151, 255, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade up */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Float */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(41, 151, 255, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(41, 151, 255, 0); }
}

/* Gradient shift */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* WhatsApp pulse */
@keyframes whatsappPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Rotate */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Spin slow */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================
   TESTIMONIALS CAROUSEL
   ============================================ */
.testimonial-carousel {
  overflow: hidden;
  position: relative;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

/* ============================================
   PORTFOLIO FILTERS
   ============================================ */
.portfolio-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
}

/* ============================================
   WHATSAPP BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 500;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  animation: whatsappPulse 2s infinite;
  transition: transform 0.2s;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover {
  transform: scale(1.1) !important;
  animation: none;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
}

/* ============================================
   ICON BOXES
   ============================================ */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 0;
}

/* ============================================
   STAT COUNTERS
   ============================================ */
.counter-value {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input option {
  background: #111;
  color: #fff;
}

/* ============================================
   BLOG CONTENT
   ============================================ */
.blog-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.blog-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.blog-content ul, .blog-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.blog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.blog-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-content blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 12px 24px;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.blog-content code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   TECH TAGS
   ============================================ */
.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tech-tag:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ============================================
   MAGNETIC CARD TILT
   ============================================ */
.magnetic-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
}

/* ============================================
   TEXT REVEAL
   ============================================ */
.text-reveal-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.text-reveal-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.text-reveal-word.revealed .text-reveal-inner {
  transform: translateY(0);
}

/* ============================================
   HERO CANVAS
   ============================================ */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

/* ============================================
   NOISE TEXTURE OVERLAY
   ============================================ */
.noise-overlay {
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ============================================
   SECTION LABELS
   ============================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(41, 151, 255, 0.1);
  border: 1px solid rgba(41, 151, 255, 0.2);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rotate 0.6s linear infinite;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */
.success-message {
  display: none;
  padding: 16px 24px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  color: #22c55e;
  font-weight: 500;
}

.success-message.show {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   FILTER BUTTONS
   ============================================ */
.filter-btn {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.mobile-menu a:hover {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .btn-primary, .btn-secondary {
    padding: 12px 24px;
    font-size: 14px;
  }

  .card {
    padding: 24px;
  }
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ============================================
   ACTIVE NAV HIGHLIGHT
   ============================================ */
.nav-active {
  color: var(--text-primary) !important;
}

.nav-active::after {
  width: 100% !important;
}
