/* Modern Minimalist Portfolio - 2025 Style */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Modern Variables with Extended Color Palette */
:root {
  /* Modern color scheme - Sage and Stone */
  --primary: #5e8c70;
  --primary-light: #e8f2ec;
  
  --accent: #ff7e5f;
  
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-800: #1f2937;
  
  /* Text colors */
  --text-primary: var(--neutral-800);
  --text-secondary: var(--neutral-600);
  --text-muted: var(--neutral-500);
  --text-light: var(--neutral-50);
  
  /* Spacing system - 8pt grid */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem;  /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem;  /* 24px */
  --space-8: 2rem;    /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem;   /* 48px */
  --space-16: 4rem;   /* 64px */
  --space-20: 5rem;   /* 80px */
  --space-24: 6rem;   /* 96px */
  
  /* Typography */
  --font-sans: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
  
  --fs-xs: 0.75rem;   /* 12px */
  --fs-sm: 0.875rem;  /* 14px */
  --fs-md: 1rem;      /* 16px */
  --fs-lg: 1.125rem;  /* 18px */
  --fs-xl: 1.25rem;   /* 20px */
  --fs-2xl: 1.5rem;   /* 24px */
  --fs-3xl: 1.875rem; /* 30px */
  --fs-4xl: 2.25rem;  /* 36px */
  --fs-5xl: 3rem;     /* 48px */
  --fs-6xl: 4rem;     /* 64px */
  
  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --card-border-radius: 24px;
  --blob-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  
  /* Transitions */
  --transition-all: all 0.3s ease;
  --transition-slow: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  perspective: 1000px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Card Container */
.card-container {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 1;
}

/* Card Flip Container */
.card-flip {
  position: relative;
  width: 100%;
  height: 100vh;
  z-index: 2;
  overflow: hidden;
  perspective: 1000px; /* Enable 3D perspective for flip effect */
}

/* Card Animation System */
.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  backface-visibility: hidden; /* Hide the back face during flip */
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
}

/* Default state: show front, hide back */
.card-front {
  transform: rotateY(0deg);
  z-index: 2;
  opacity: 1;
}

.card-back {
  transform: rotateY(180deg); /* Start rotated 180 degrees (hidden) */
  z-index: 1;
  background: #ffffff;
  padding: 0;
  overflow-y: auto;
  box-sizing: border-box;
  display: block;
  visibility: visible;
  opacity: 0;
}

/* Flipped state: hide front, show back */
.card-flip.flipped .card-front {
  transform: rotateY(-180deg); /* Rotate front card away */
  z-index: 1;
  opacity: 0;
}

.card-flip.flipped .card-back {
  transform: rotateY(0deg); /* Rotate back card to front */
  z-index: 2;
  opacity: 1;
}

/* Front Card */
.card-front {
  padding: var(--space-12);
  background: #ffffff;
  overflow: visible;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100vh;
  gap: var(--space-4);
  position: relative;
}

/* Mobile adjustments for card padding */
@media (max-width: 768px) {
  .card-front {
    padding: var(--space-8);
  }
}

/* Clean Professional Language Selector */
.language-selector {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  display: flex;
  gap: 4px;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
  background: transparent;
  border: none;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  min-width: 32px;
  text-align: center;
  letter-spacing: 0.5px;
}

.lang-btn.active {
  color: #ffffff;
  background: var(--text-primary);
  box-shadow: 
    0 2px 8px rgba(26, 32, 44, 0.2),
    0 1px 2px rgba(26, 32, 44, 0.1);
  transform: none;
}

.lang-btn.active::after {
  display: none;
}

.lang-btn:not(.active):hover {
  color: var(--text-primary);
  background: rgba(26, 32, 44, 0.05);
  transform: none;
}

.lang-btn:not(.active):hover::after {
  display: none;
}

/* Profile Section */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Profile Info Grouping */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.role-location-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

/* Hero Profile Image Container - Clean Integration */
.profile-image-container {
  width: 240px;
  height: 240px;
  margin-bottom: var(--space-6);
  position: relative;
  background: #ffffff;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.profile-image-container::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.1) 0%,
    rgba(88, 86, 214, 0.08) 50%,
    rgba(255, 45, 85, 0.06) 100%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-image-container:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: rgba(255, 255, 255, 0.9);
}

.profile-image-container:hover::before {
  opacity: 1;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: block;
}

.profile-image-container:hover .profile-image {
  transform: scale(1.01);
}

@keyframes profile-intro {
  0% {
    transform: scale(0.7);
    opacity: 0;
    filter: blur(4px);
  }
  60% {
    transform: scale(1.05);
    opacity: 0.8;
    filter: blur(1px);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0px);
  }
}

/* Add enhanced intro animation to profile container */
.profile-image-container.animate {
  animation: profile-intro 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.profile-image:hover {
  filter: contrast(1.05) saturate(1.08) brightness(1.02);
}

/* Modern Typography for Name and Role */
.name {
  font-size: var(--fs-5xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  letter-spacing: -1px;
  line-height: 1.1;
  position: relative;
}

.name::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

.role {
  font-size: var(--fs-xl);
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.9;
}

/* Location with Modern Icon */
.location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.location-icon {
  color: var(--primary);
}

/* Curiosity Badge - Elegant Accent */
.curiosity-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.08) 0%, 
    rgba(118, 75, 162, 0.06) 50%, 
    rgba(79, 172, 254, 0.08) 100%);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 50px;
  backdrop-filter: blur(8px);
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.curiosity-badge:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.12) 0%, 
    rgba(118, 75, 162, 0.08) 50%, 
    rgba(79, 172, 254, 0.12) 100%);
  border-color: rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.curiosity-symbol {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

.curiosity-text {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Bio Section */
.bio-section {
  text-align: center;
  max-width: 85%;
  margin: 0 auto var(--space-8);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.hero-tagline {
  font-size: var(--fs-xl);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  position: relative;
  font-style: normal;
  max-width: 600px;
}

/* Modern Stats Section */
.stats-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--space-2), 2vw, var(--space-4)); /* Responsive gap */
  margin: var(--space-6) 0;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  max-width: min(100%, 600px); /* Limit maximum width */
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background-color: var(--white);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid rgba(26, 32, 44, 0.1);
  min-height: 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.stat-item:hover::before {
  transform: translateX(0);
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 122, 255, 0.15);
  border-color: var(--primary);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  position: relative;
  display: inline-block;
  line-height: 1.1;
}

.stat-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
  margin-top: var(--space-1);
}

/* Modern Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: auto;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  padding-top: var(--space-4);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: var(--white);
  color: var(--text-secondary);
  transition: var(--transition-all);
  border: 1px solid rgba(26, 32, 44, 0.1);
}

.social-link:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
  border-color: var(--text-primary);
}



/* Resume Button (Flip Button) - Attached to Front Card */
.resume-btn {
  background: #1a202c;
  border: none;
  border-radius: 12px;
  width: 50px;
  height: 50px;
  color: #ffffff;
  transition: all 0.3s ease;
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 32, 44, 0.2);
  z-index: 10;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Return Button - Attached to Back Card */
.return-button {
  background: #1a202c;
  border: none;
  border-radius: 12px;
  width: 50px;
  height: 50px;
  color: #ffffff;
  transition: all 0.3s ease;
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 32, 44, 0.2);
  z-index: 10;
  cursor: pointer;
  font-size: 1.1rem;
}

.resume-btn:hover {
  transform: translateY(-3px) scale(1.05);
  background: #2d3748;
  box-shadow: 0 8px 24px rgba(26, 32, 44, 0.3);
}

.return-button:hover {
  transform: translateY(-3px) scale(1.05);
  background: #2d3748;
  box-shadow: 0 8px 24px rgba(26, 32, 44, 0.3);
}

/* CV Side Styling */
.cv-content {
  padding: var(--space-12);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  /* Remove any height constraints and overflow settings */
}

/* Introduction Section */
.cv-intro {
  margin-bottom: var(--space-12) !important;
  padding: 0 0 var(--space-8) 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: center;
  box-shadow: none;
  position: relative;
  overflow: visible;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.cv-intro::before {
  display: none;
}

.intro-content {
  position: relative;
  z-index: 1;
}

.intro-name {
  font-size: 2.5rem;
  font-weight: 300;
  color: #1a202c;
  margin-bottom: var(--space-2);
  letter-spacing: -1px;
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.intro-title {
  font-size: 1.125rem;
  font-weight: 400;
  color: #64748b;
  margin-bottom: 0;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.intro-divider {
  display: none;
}

/* Timeline Section */
.cv-section {
  margin-bottom: var(--space-20);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.cv-section:nth-child(1) { animation-delay: 0.1s; }
.cv-section:nth-child(2) { animation-delay: 0.2s; }
.cv-section:nth-child(3) { animation-delay: 0.3s; }
.cv-section:nth-child(4) { animation-delay: 0.4s; }
.cv-section:nth-child(5) { animation-delay: 0.5s; }

.cv-section-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #1a202c;
  margin-bottom: var(--space-12);
  position: relative;
  display: block;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

.cv-section-title::after {
  display: none;
}

/* About Section - Consistent Formatting */
.cv-about .about-content {
  padding: 0;
  margin-top: var(--space-4);
}

.about-description {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
  text-align: left;
  margin: 0;
  font-style: normal;
}
.timeline {
  position: relative;
  padding-left: 0;
  margin-top: 0;
}

.timeline::before {
  display: none;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-16);
  padding-left: 0;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: var(--space-8);
}

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

.timeline-marker {
  display: none;
}

.timeline-content {
  background: transparent;
  border-radius: 0;
  padding: 0;
  transition: none;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.timeline-content::before {
  display: none;
}

.timeline-item:hover .timeline-content {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.timeline-item:hover .timeline-content::before {
  display: none;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a202c;
  margin-bottom: var(--space-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.timeline-period {
  display: inline-block;
  background: transparent;
  color: #64748b;
  font-weight: 400;
  font-size: 0.875rem;
  padding: 0;
  border-radius: 0;
  margin-bottom: var(--space-3);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

.timeline-description {
  color: #4a5568;
  margin-bottom: var(--space-4);
  line-height: 1.6;
  font-size: 0.95rem;
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.tech-tag {
  display: inline-block;
  padding: var(--space-1) 0;
  background: transparent;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 400;
  border-radius: 0;
  transition: none;
  border: none;
  backdrop-filter: none;
  margin-right: var(--space-3);
  position: relative;
}

.tech-tag:after {
  content: '•';
  margin-left: var(--space-3);
  color: #cbd5e1;
}

.tech-tag:last-child:after {
  display: none;
}

.tech-tag:hover {
  background: transparent;
  color: #1a202c;
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  margin-top: var(--space-8);
}

.project-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  transition: none;
  height: auto;
  display: block;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
  overflow: visible;
  box-shadow: none;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: var(--space-8);
}

.project-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.project-card::before {
  display: none;
}

.project-card:hover {
  transform: none;
  box-shadow: none;
  border-color: #f1f5f9;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
  z-index: 1;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a202c;
  margin-bottom: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.project-year {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  color: #64748b;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-description {
  color: #4a5568;
  margin-bottom: var(--space-3);
  flex-grow: 1;
  z-index: 1;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  z-index: 1;
}

/* CV Footer */
.cv-footer {
  margin-top: var(--space-20);
  text-align: left;
  padding: var(--space-8) 0 0 0;
  border-top: 1px solid #e2e8f0;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-top: 1px solid #e2e8f0;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.cv-footer::before {
  display: none;
}

.cv-footer p {
  font-style: italic;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

/* Animations */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}

.animate {
  animation: fadeIn 0.8s forwards;
  opacity: 0;
}

.animate-left {
  animation: slideInLeft 0.8s forwards;
  opacity: 0;
}

.animate-right {
  animation: slideInRight 0.8s forwards;
  opacity: 0;
}

.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* Responsive Adjustments */
@media (max-width: 1200px) {
  :root {
    --card-width: 100vw;
    --card-height: 100vh;
  }
  
  .card-front, 
  .card-back {
    padding: var(--space-12);
  }
  
  .cv-content {
    padding: 0 var(--space-8) var(--space-8);
  }
  
  .name {
    font-size: var(--fs-4xl);
  }
  
  .stats-section {
    margin: var(--space-12) 0;
  }
}

@media (max-width: 992px) {
  :root {
    --card-height: 100vh;
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-tagline {
    max-width: 90%;
  }
  
  .stats-section {
    max-width: 500px;
    gap: var(--space-3);
  }
  
  .stat-item {
    min-height: 100px;
    padding: var(--space-3);
  }
  
  .stat-value {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  :root {
    --card-height: 100vh;
  }
  
  .cv-content {
    padding: var(--space-6);
    max-width: 100%;
  }
  
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    max-width: 400px;
    margin: var(--space-4) auto;
  }
  
  .stat-item {
    min-height: 90px;
    padding: var(--space-3);
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .cv-content {
    padding: var(--space-8);
  }
  
  .cv-intro {
    padding-bottom: var(--space-8);
    margin-bottom: var(--space-16) !important;
  }
  
  .intro-name {
    font-size: 2rem;
  }
  
  .intro-title {
    font-size: 1rem;
  }
  
  .timeline-item {
    padding-left: var(--space-6);
  }
  
  .timeline {
    padding-left: var(--space-8);
  }
  
  .timeline-marker {
    left: -8px;
  }
  
  .stats-section {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    margin: var(--space-4) 0;
    max-width: 280px;
  }
  
  .stat-item {
    min-height: 80px;
    padding: var(--space-2);
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .profile-image-container {
    width: 200px;
    height: 200px;
  }
  
  .name {
    font-size: var(--fs-3xl);
  }
  
  .hero-tagline {
    max-width: 100%;
    font-size: var(--fs-lg);
  }
  
  .hero-tagline::before,
  .hero-tagline::after {
    font-size: 3rem;
  }
  
  .language-selector {
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-1) var(--space-2);
  }
  
  .return-button {
    top: var(--space-4);
    left: var(--space-4);
    width: 44px;
    height: 44px;
  }
  
  .resume-btn {
    top: var(--space-4);
    left: var(--space-4);
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 576px) {
  :root {
    --card-height: 100vh;
  }
  
  .card-container {
    padding: 0;
    width: 100vw;
  }
  
  /* Keep the same slide transition approach on mobile */
  .card-flip {
    min-height: 100vh;
  }
  
  .card-front, 
  .card-back {
    min-height: 100vh;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .profile-image-container {
    width: 160px;
    height: 160px;
    margin-bottom: var(--space-6);
  }
  
  .social-links {
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--space-8);
  }
  
  .social-link {
    width: 44px;
    height: 44px;
  }
  
  .cv-section-title {
    font-size: var(--fs-lg);
  }
  
  .timeline-title {
    font-size: var(--fs-base);
  }
  
  .project-card {
    padding: var(--space-6);
  }
  
  .intro-name {
    font-size: 1.75rem;
  }
  
  .intro-title {
    font-size: 0.95rem;
  }
  
  .cv-intro {
    padding-bottom: var(--space-6);
    margin-bottom: var(--space-12) !important;
  }
  
  .return-button {
    top: var(--space-4);
    left: var(--space-4);
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }
  
  .cv-title {
    font-size: var(--fs-base);
  }
  
  .resume-btn {
    top: var(--space-4);
    left: var(--space-4);
    width: 40px;
    height: 40px;
  }
  
  .return-button {
    top: var(--space-3);
    left: var(--space-3);
    width: 44px;
    height: 44px;
    position: fixed;
    transform: none;
    -webkit-transform: none;
  }
  
  .language-selector {
    top: var(--space-3);
    right: var(--space-3);
    left: auto !important; /* Force override any left positioning */
    z-index: 1000; /* Ensure it stays on top */
    position: fixed; /* Use fixed positioning on mobile */
  }
}

@media (max-width: 480px) {
  :root {
    --card-height: 100vh;
    --card-width: 100vw;
  }
  
  .card-container {
    padding: 0;
    width: 100vw;
  }
  
}

@media (max-width: 480px) {
  :root {
    --card-height: 100vh;
    --card-width: 100vw;
  }
  
  .card-container {
    padding: 0;
    width: 100vw;
  }
  
  .card-front,
  .card-back {
    padding: var(--space-6);
  }
  
  .cv-content {
    padding: var(--space-6);
  }
  
  .cv-intro {
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-8) !important;
  }
  
  .intro-name {
    font-size: 1.5rem;
  }
  
  .intro-title {
    font-size: 0.875rem;
  }
  
  .return-button {
    top: var(--space-3);
    left: var(--space-3);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    font-size: 0.875rem;
  }
  
  .profile-image-container {
    width: 140px;
    height: 140px;
  }
  
  .name {
    font-size: var(--fs-2xl);
  }
  
  .hero-tagline {
    font-size: var(--fs-base);
  }
  
  .hero-tagline::before,
  .hero-tagline::after {
    font-size: 2rem;
  }
  
  .stats-section {
    margin: var(--space-3) 0;
    max-width: 250px;
    gap: var(--space-2);
  }
  
  .stat-item {
    padding: var(--space-2);
    min-height: 70px;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .stat-item {
    padding: var(--space-2);
  }
  
  .social-links {
    margin-top: var(--space-6);
  }
  
  .timeline {
    padding-left: var(--space-6);
  }
  
  .timeline-item {
    padding-left: var(--space-4);
    margin-bottom: var(--space-12);
  }
  
  .timeline-marker {
    left: -6px;
    width: 16px;
    height: 16px;
  }
  
  .project-card {
    padding: var(--space-4);
  }
  
  .cv-name {
    font-size: var(--fs-2xl);
  }
  
  .cv-title {
    font-size: var(--fs-sm);
  }
  
  .resume-btn {
    top: var(--space-2);
    left: var(--space-2);
    width: 40px;
    height: 40px;
  }
  
  .return-button {
    top: var(--space-2);
    left: var(--space-2);
    width: 40px;
    height: 40px;
  }
  
  .language-selector {
    top: var(--space-2);
    right: var(--space-2);
    left: auto !important; /* Force override any left positioning */
    z-index: 1000; /* Ensure it stays on top */
    position: fixed; /* Use fixed positioning on mobile */
  }
}
