/* ============================================
   MODERN AI VIBE - Glassmorphism + Gradients
   ============================================ */

:root {
  /* Color Palette */
  --color-bg: #0a0a12;
  --color-surface: rgba(20, 20, 35, 0.6);
  --color-surface-hover: rgba(30, 30, 50, 0.8);
  --color-text: #e4e4e7;
  --color-text-muted: #a1a1aa;
  --color-accent: #6366f1;
  --color-accent-hover: #818cf8;
  --color-border: rgba(99, 102, 241, 0.2);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-bg: linear-gradient(135deg, #0a0a12 0%, #1a0a2e 50%, #0a0a12 100%);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Effects */
  --blur-glass: blur(12px);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* ============================================
   BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  position: relative;
  overflow-x: clip;
}

/* Animated Background with Grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  animation: gridScroll 20s linear infinite;
}

@keyframes gridScroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Floating gradient orbs */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  z-index: -1;
  animation: float 15s ease-in-out infinite;
}

.gradient-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--gradient-primary);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.gradient-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--gradient-secondary);
  bottom: -150px;
  left: -150px;
  animation-delay: 5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ============================================
   NAVIGATION
   ============================================ */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-surface);
  backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

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

.btn-all {
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  border-radius: 0.5rem;
  color: white !important;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-all:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s ease;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
  min-height: calc(100vh - 200px);
  padding: var(--spacing-xl) var(--spacing-md);
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.page-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--spacing-sm);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: var(--spacing-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.page-content {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   STICKY SECTION HEADERS (all.md)
   ============================================ */

.sticky-section-h2 {
  position: sticky;
  top: var(--nav-height, 64px);
  z-index: 100;
  background: rgba(10, 10, 18, 0.95);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
}

.sticky-section-h2 h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.section-sentinel {
  height: 0;
  visibility: hidden;
}

/* ============================================
   GLASS CARDS
   ============================================ */

.glass-card {
  background: var(--color-surface);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.glass-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.glass-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-accent);
}

.glass-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  text-align: center;
  padding: var(--spacing-2xl) 0;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: var(--spacing-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

/* ============================================
   TIMELINE (for Experience)
   ============================================ */

.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--spacing-xl) - 6px);
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg);
}

.timeline-content {
  background: var(--color-surface);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateX(8px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.timeline-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.timeline-company {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.timeline-highlights {
  list-style: none;
  margin-top: var(--spacing-md);
}

.timeline-highlights li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text-muted);
}

.timeline-highlights li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* ============================================
   SKILL CHIPS
   ============================================ */

.skill-group {
  margin-bottom: var(--spacing-xl);
}

.skill-group h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--color-accent);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.skill-chip {
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.skill-chip:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   SOCIAL LINKS
   ============================================ */

.social-links {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.social-links a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
  background: var(--color-surface);
  backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-xl) var(--spacing-md);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-about h3,
.footer-links h4,
.footer-social h4 {
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    backdrop-filter: var(--blur-glass);
    flex-direction: column;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  .timeline {
    padding-left: var(--spacing-md);
  }
  
  .timeline-item::before {
    left: calc(-1 * var(--spacing-md) - 6px);
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* ============================================
   ACCESSIBILITY
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
