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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #a855f7;
  --purple-light: #f3f4f6;
  --purple-lighter: #faf5ff;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --white: #ffffff;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
  --shadow-hover: 0 20px 60px rgba(99, 102, 241, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
  opacity: 0.1;
}

.shape:nth-child(1) {
  width: 100px;
  height: 100px;
  background: var(--gradient-purple);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 150px;
  height: 150px;
  background: var(--gradient-2);
  top: 60%;
  right: 10%;
  animation-delay: -5s;
}

.shape:nth-child(3) {
  width: 80px;
  height: 80px;
  background: var(--gradient-3);
  bottom: 20%;
  left: 20%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(90deg); }
  50% { transform: translateY(-40px) rotate(180deg); }
  75% { transform: translateY(-20px) rotate(270deg); }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  transform: translateY(-100%);
  animation: slideDown 0.8s ease-out 0.5s forwards;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

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

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

.nav-cta {
  background: var(--gradient-purple);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.hero-content {
  max-width: 800px;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

.hero-greeting {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.4s forwards;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--text-light);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1s forwards;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.2s forwards;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

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

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Sections */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 4rem;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.section-title.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-purple);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.card.animate {
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Skills */
.skill-bar {
  margin-bottom: 1.5rem;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.skill-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-purple);
  border-radius: 10px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.5s ease 0.3s;
}

.skill-fill.animate {
  transform: scaleX(1);
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.profile-image {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

/* Contact */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 2rem;
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-link:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--shadow-hover);
}

/* Animations */
@keyframes slideDown {
  to { transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .section {
    padding: 4rem 1rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Project hover effects */
.project-card {
  min-width: 340px;
  max-width: 420px;
  width: 380px;
  height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 2.5rem 2rem 2rem 2rem;
  box-sizing: border-box;
}

.project-card h3 {
  text-align: justify;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.project-card p {
  text-align: justify;
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(99, 102, 241, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid white;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: white;
  color: var(--primary);
}

/* Certifications Section uses existing section, section-title, cards-grid, and card styles for consistency */

/* Enhanced Education Table Styles */
.edu-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.1rem;
  background: transparent;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  overflow: hidden;
  margin: 1rem 0;
}

.edu-table th, 
.edu-table td {
  padding: 1.25rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.edu-table th {
  background: var(--gradient-purple);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  position: relative;
}

.edu-table th:first-child {
  border-top-left-radius: 20px;
}

.edu-table th:last-child {
  border-top-right-radius: 20px;
}

.edu-table tbody tr {
  transition: all 0.2s ease-in-out;
}

.edu-table tbody tr:nth-child(even) {
  background: rgba(139, 92, 246, 0.02);
}

.edu-table tbody tr:hover {
  background: var(--purple-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.edu-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 20px;
}

.edu-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 20px;
}

.edu-table tbody tr:last-child td {
  border-bottom: none;
}

.edu-table td {
  font-weight: 500;
  line-height: 1.6;
}

/* Add subtle left border accent for first column */
.edu-table td:first-child {
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease;
}

.edu-table tbody tr:hover td:first-child {
  border-left-color: var(--gradient-purple);
}

/* Improved responsive design */
@media (max-width: 768px) {
  .edu-table {
    font-size: 1rem;
    margin: 0.5rem 0;
  }
  
  .edu-table th, 
  .edu-table td {
    padding: 1rem 0.75rem;
  }
  
  .edu-table th {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .edu-table {
    font-size: 0.9rem;
  }
  
  .edu-table th, 
  .edu-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .edu-table th {
    font-size: 0.85rem;
  }
}

/* Optional: Add loading animation */
.edu-table.loading {
  opacity: 0.7;
  pointer-events: none;
}

.edu-table.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skill-group-icon {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto 1rem auto;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.skill-list li {
  background: #f3f4f6;
  color: var(--text-dark);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  box-shadow: 0 1px 4px rgba(99,102,241,0.05);
  transition: background 0.2s;
}

.skill-list li:hover {
  background: #e0e7ff;
}

.skills-icons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.skill-icon-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 0.4rem 1.1rem 0.4rem 0.6rem;
  box-shadow: 0 1px 4px rgba(99,102,241,0.05);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  transition: background 0.2s;
}

.skill-icon-label:hover {
  background: #e0e7ff;
}

.skill-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: none;
  border-radius: 6px;
}

.pipeline-container {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2rem;
  scrollbar-color: #a5b4fc #f3f4f6;
  scrollbar-width: thin;
}

.pipeline-container::-webkit-scrollbar {
  height: 12px;
  background: #f3f4f6;
  border-radius: 8px;
}

.pipeline-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #a5b4fc 0%, #6366f1 100%);
  border-radius: 8px;
}

.pipeline-container::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 8px;
}

.pipeline {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: flex-start;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pipeline-arrow {
  width: 48px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-arrow::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, #a5b4fc 0%, #6366f1 100%);
  border-radius: 2px;
  position: relative;
}

.pipeline-arrow::before {
  content: '';
  display: block;
  position: absolute;
  right: 0;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #6366f1;
  transform: translateY(-50%) translateX(18px);
}

/* Remove arrow after last step */
.pipeline-step:last-child .pipeline-arrow {
  display: none;
}

@media (max-width: 900px) {
  .pipeline {
    flex-direction: column;
    gap: 2.5rem;
    align-items: stretch;
  }
  .pipeline-step {
    flex-direction: row;
    align-items: center;
  }
  .pipeline-arrow {
    width: 24px;
    height: 48px;
  }
  .pipeline-arrow::after {
    width: 4px;
    height: 40px;
    background: linear-gradient(180deg, #a5b4fc 0%, #6366f1 100%);
    margin: 0 auto;
  }
  .pipeline-arrow::before {
    border-top: 12px solid #6366f1;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 0;
    left: 50%;
    top: 100%;
    right: auto;
    transform: translateX(-50%) translateY(-8px) rotate(90deg);
  }
  .project-card {
    width: 95vw;
    min-width: unset;
    max-width: unset;
    height: auto;
  }
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1rem 0 0.5rem 0;
  justify-content: flex-start;
  align-items: center;
}

.stack-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: none;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(99,102,241,0.05);
  transition: transform 0.2s;
}

.stack-icon:hover {
  transform: scale(1.12) rotate(-4deg);
}