:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --accent-color: #8b5cf6;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --light-bg: #f8fafc;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 0.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--glossy-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

body.js-loading {
  overflow: hidden;
  height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 20%),
              radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 20%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-weight: 500;
}

a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover::after {
  width: 100%;
}

/* Header */
header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  flex-direction: column;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(188, 71, 144, 0.15) 0%, transparent 30%);
  z-index: 1;
  animation: float 8s ease-in-out infinite;
}

/* Add some decorative elements */
header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transform: rotate(30deg);
  z-index: 0;
  animation: pulse 15s infinite alternate;
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  margin: 0 auto -2rem;
  padding: 2rem 1.5rem 0;
  animation: fadeInUp 0.8s ease-out;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Add some floating particles */
.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: float 15s infinite linear;
}

/* Add this to your HTML after the header-content div */
/* <div class="particle" style="width: 6px; height: 6px; top: 20%; left: 20%;"></div>
<div class="particle" style="width: 8px; height: 8px; top: 60%; left: 80%; animation-delay: -5s;"></div>
<div class="particle" style="width: 4px; height: 4px; top: 80%; left: 30%; animation-delay: -10s;"></div> */

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating animation for decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Pulsing animation for interactive elements */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  color: white;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  display: block;
  animation: fadeInDown 0.8s ease-out;
  background: linear-gradient(90deg, #fff, #e1f5fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  z-index: 2;
  line-height: 1.2;
}

/* Floating animation for contact icons */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.contact-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
  font-size: 1.25rem;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Stagger the animation for each icon */
.contact-icons a:nth-child(1) { animation-delay: 0s; }
.contact-icons a:nth-child(2) { animation-delay: 0.3s; }
.contact-icons a:nth-child(3) { animation-delay: 0.6s; }
.contact-icons a:nth-child(4) { animation-delay: 0.9s; }

/* Hover effect */
.contact-icons a:hover {
  animation: none;
  transform: translateY(-5px) scale(1.1);
  background: var(--primary-color);
  color: white;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

header h1 .tagline {
  font-size: 1.25rem;
  font-weight: 400;
  display: block;
  margin-top: 0.25rem;
  color: white;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -webkit-text-fill-color: white;
  background: none !important;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: white;
  text-fill-color: white;
  color: white !important;
  opacity: 0.95;
  animation: fadeIn 0.8s ease-out 0.2s both;
  position: relative;
  z-index: 2;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.2rem;
  margin-top: 0.75rem;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0 0;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  padding-bottom: 1rem;
}

.contact-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.contact-icons a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.contact-icons a:hover {
  transform: translateY(-5px) scale(1.1);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-icons a:hover::before {
  transform: translateX(100%);
}

.contact-icons a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Download CV Button */
.download-cv-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0 1.5rem;
  padding: 0 1rem;
}

.modern-download-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 28px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  z-index: 1;
}

.modern-download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.3);
}

.modern-download-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-download-btn:hover .btn-icon {
  animation: bounce 0.6s ease infinite alternate;
}

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

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
  z-index: -1;
}

.modern-download-btn:hover .btn-shine {
  left: 100%;
}

/* Pulse animation on page load */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.modern-download-btn {
  animation: pulse 2s infinite;
}

/* Remove animation after first interaction */
.modern-download-btn:active,
.modern-download-btn:focus {
  animation: none;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  border: 2px solid rgba(255, 255, 255, 0.9);
  outline: none;
  /* Ensure it's visible by default when scrolled */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hide only when at the very top of the page */
html:not([data-scroll='0']) .back-to-top {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hide when at the top */
html[data-scroll='0'] .back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top:focus {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

/* Pulsing animation when scrolling down */
.back-to-top.scrolling-down {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Reduce size on mobile */
@media (max-width: 768px) {
  .back-to-top {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* Skill Bar Hover Effects */
.skill-bar {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-bar:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.skill-bar::after {
  content: attr(data-percent);
  position: absolute;
  right: 0;
  top: -25px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-bar:hover::after {
  opacity: 1;
}

/* Smooth hover for all interactive elements */
a, button, .btn, .card, .contact-item, .skill-bar {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
main.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Space for fixed header */
}

/* Buttons */
.btn {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: var(--glass-border);
  position: relative;
  overflow: hidden;
}

/* Sections */
section {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: var(--glass-border);
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-effect);
  z-index: -1;
}

section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: var(--card-hover);
}

/* Projects */
.projects {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin: 4rem 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-effect);
  z-index: -1;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.project-card h3 {
  color: var(--primary-color);
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

.project-card p {
  color: var(--text-light);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  margin-top: auto;
  padding: 0.5rem 0;
}

.project-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.project-link i {
  font-size: 1.1rem;
}

/* Key Achievements & Innovation */
.key-achievements,
.innovation {
  margin: 2.5rem 0 0;
  background: var(--gray-50);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.key-achievements h3,
.innovation h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0;
  color: var(--primary-dark);
  font-size: 1.25rem;
}

.key-achievements h3 i {
  color: var(--accent-color);
}

.innovation h3 i {
  color: var(--secondary-color);
}

.key-achievements ul,
.innovation ul {
  margin: 1rem 0 0 0;
  padding-left: 1.5rem;
}

.key-achievements li,
.innovation li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: var(--text-color);
  position: relative;
  padding-left: 1.75rem;
}

.key-achievements li:before,
.innovation li:before {
  content: '→';
  color: var(--accent-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Job experience improvements */
.job {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--gray-200);
  margin-bottom: 2.5rem;
}

.job:last-child {
  margin-bottom: 0;
}

.job::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.job-header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: #333;
  line-height: 1.2;
}

/* Typing animation */
header h1 {
  min-height: 3.5rem; /* Ensure consistent height during typing */
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  color: var(--primary-color);
  font-weight: bold;
}

#typing-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid transparent;
  letter-spacing: 0.5px;
}

.job-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-color);
  font-weight: 600;
}

.company {
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
  padding-left: 1.25rem;
}

.company::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: var(--gray-400);
}

.duration {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-left: auto;
  background: var(--gray-50);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
}

.achievements {
  margin: 1.25rem 0 0 0;
  padding-left: 0;
}

.achievements li {
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.7;
}

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

/* Typography */
h2 {
  color: var(--gray-800);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 3px;
}

h3 {
  color: var(--primary-dark);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}

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

ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.7;
  color: var(--text-color);
}

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

/* Contact Info */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.contact-info::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  transform: rotate(15deg);
  z-index: -1;
  opacity: 0.5;
  animation: shine 6s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(15deg); }
  20% { transform: translateX(100%) rotate(15deg); }
  100% { transform: translateX(100%) rotate(15deg); }
}

.contact-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.95rem;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.contact-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  z-index: -1;
  border-radius: inherit;
}

.contact-item i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 10px;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

.contact-item i::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
}

.contact-icons a {
  color: var(--text-color);
  font-size: 1.25rem;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

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

.contact-icons a:nth-child(1) { animation-delay: 0s; }
.contact-icons a:nth-child(2) { animation-delay: 0.5s; }
.contact-icons a:nth-child(3) { animation-delay: 1s; }
.contact-icons a:nth-child(4) { animation-delay: 1.5s; }

.contact-icons a:hover {
  animation: none;
  transform: translateY(-5px) scale(1.2);
  color: var(--primary-color);
}

.contact-item a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  display: inline-block;
  flex-shrink: 1;
}

.contact-item a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-info {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .contact-item {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto; /* Allows horizontal scrolling if needed */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-right: 1rem;
  }
  
  .contact-item::-webkit-scrollbar {
    display: none; /* Hide scrollbar for cleaner look */
  }
}

.contact-item a {
  color: var(--text-color);
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary-color);
}

/* Skills */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.skill-category h3 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.skill-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--gray-50);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

/* Skill Icons Styling */
.skill-tags span i {
  width: 16px;
  text-align: center;
  font-size: 0.9em;
}

/* Brand Colors for Icons */
.fa-java { color: #007396; }
.fa-js { color: #f7df1e; }
.fa-docker { color: #2496ed; }
.fa-github { color: #181717; }
.fa-gitlab { color: #fc6d26; }
.fa-jenkins { color: #d24939; }
.fa-aws { color: #FF9900; }
.fa-google { color: #4285F4; }
.fa-jira { color: #0052CC; }
.fa-confluence { color: #172B4D; }
.fa-play { color: #2c3e50; }
.fa-plug { color: #7e57c2; }
.fa-envelope { color: #ff5722; }
.fa-project-diagram { color: #4caf50; }
.fa-seedling { color: #8bc34a; }
.fa-vial { color: #9c27b0; }
.fa-flask { color: #2196f3; }
.fa-database { color: #607d8b; }
.fa-terminal { color: #3f51b5; }
.fa-cube { color: #00bcd4; }
.fa-rocket { color: #e91e63; }
.fa-box { color: #795548; }
.fa-cloud { color: #00b0ff; }

.skill-tags span:hover {
  background: white;
  color: var(--text-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.skill-tags span:hover i {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .skill-tags {
    gap: 0.4rem;
  }
  
  .skill-tags span {
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
  }
  
  .skill-tags span i {
    font-size: 0.8em;
  }
  
  .skill-tags span {
    border-color: var(--primary-dark);
  }
}

/* Projects Section */
.projects {
  margin: 4rem 0;
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-effect);
  z-index: -1;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  perspective: 1000px;
  min-height: 200px;
}

/* Project card styles with animation */
.project-card {
  background: var(--card-bg);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 2rem;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  color: var(--text-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin: 1rem 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  will-change: transform, opacity;
  transition-delay: calc(var(--index, 0) * 0.1s);
}

/* Animation when card is in view */
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effect */
.project-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.project-card h3 {
  color: #2563eb !important;
  margin-bottom: 1rem !important;
  font-size: 1.25rem !important;
}

.project-card p {
  color: #333 !important;
  margin-bottom: 1.5rem !important;
}

.project-link {
  color: #2563eb !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.project-link:hover {
  text-decoration: underline !important;
}

.project-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), 
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  transition-delay: calc(var(--index, 0) * 0.1s);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: -1;
}

.project-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

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

.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.project-card p {
  color: var(--text-light);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: auto;
  align-self: flex-start;
}

.project-link i {
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

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

.project-link:hover i {
  transform: translateX(3px);
}

/* Experience */
.job {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed var(--gray-200);
}

.job:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.job h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.company {
  font-weight: 600;
  color: var(--text-color);
  position: relative;
  padding-left: 1rem;
}

.company::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: var(--gray-300);
}

.duration {
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--text-light);
  background: var(--gray-50);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
}

.achievements {
  margin-top: 1rem;
  padding-left: 0;
}

.achievements li {
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
}

/* Education & Certifications */
.education-item {
  margin-bottom: 1.5rem;
}

.education-item:last-child {
  margin-bottom: 0;
}

.institution {
  font-weight: 500;
  margin: 0.25rem 0;
  color: var(--text-color);
}

/* Footer */
footer {
  background: var(--white);
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 4rem;
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.05);
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-content p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--primary-color);
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 3.5rem 1rem;
  }
  
  header h1 {
    font-size: 2.25rem;
  }
  
  .tagline {
    font-size: 1.25rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  section {
    padding: 1.75rem;
  }
  
  .contact-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .job-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .duration {
    margin-left: 0;
    align-self: flex-start;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

section {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

/* Add delay for each section */
.contact-info { animation-delay: 0.1s; }
.summary { animation-delay: 0.2s; }
.skills { animation-delay: 0.3s; }
.experience { animation-delay: 0.4s; }
.education { animation-delay: 0.5s; }
.certifications { animation-delay: 0.6s; }

/* Loading Animation */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Lazy Loading */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

/* Page Load Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Apply to body with reduced motion preference check */
@media (prefers-reduced-motion: no-preference) {
  body {
    animation: fadeIn 0.8s ease-in-out forwards;
    opacity: 0; /* Start with 0 opacity */
  }
}

/* Reset and Base Styles */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Print Styles */
@media print {
  body {
    background: white;
    font-size: 12pt;
    line-height: 1.5;
  }
  
  header {
    padding: 2rem 0;
    background: white !important;
    color: var(--text-color) !important;
  }
  
  header h1 {
    color: var(--primary-dark) !important;
  }
  
  .contact-icons,
  .social-links {
    display: none !important;
  }
  
  section {
    box-shadow: none !important;
    border: 1px solid var(--gray-200) !important;
    page-break-inside: avoid;
  }
  
  .container {
    padding: 0;
  }
  
  a {
    text-decoration: none !important;
  }
  
  footer {
    display: none;
  }
}

/* Tech Stack Section */
.tech-stack {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-stack:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.tab-btn i {
  font-size: 1rem;
  transition: all 0.3s ease;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.tab-btn.active {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
}

.tab-btn.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.tab-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Tech Categories */
.tech-category {
  display: none;
  animation: fadeIn 0.5s ease-out;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-category.active {
  display: block;
  opacity: 1;
}

/* Ensure hidden attribute works */
.tech-category[hidden] {
  display: none !important;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

/* Tech Cards */
.project-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition-delay: calc(var(--index, 0) * 0.1s);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

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

.project-card .project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-card .project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
  margin-top: 2px; /* Reduced top margin to prevent layout shift */
  margin-bottom: -2px;
  padding-top: 2.2rem; /* Slightly increase top padding on hover */
}

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

.tech-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-light-10);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin: 0.5rem auto; /* Add margin to prevent clipping */
  position: relative;
  left: 0;
  right: 0;
  transform-origin: center center; /* Ensure rotation happens from center */
}

.tech-card:hover .tech-icon {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.tech-name {
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  width: 100%;
  padding: 0 0.5rem; /* Add some padding to prevent text touching edges */
}

.tech-level {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 500;
  margin: 0; /* Reset margins */
  line-height: 1.3;
  text-align: center;
  width: 100%;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }
  
  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .tech-card {
    padding: 1.8rem 0.5rem 1.5rem; /* Match desktop padding */
    min-height: 160px; /* Slightly smaller min-height for mobile */
  }
  
  .tech-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    margin: 0.3rem auto; /* Adjusted margin for mobile */
  }
  
  .tech-name {
    font-size: 0.9rem;
  }
  
  .tech-level {
    font-size: 0.75rem;
  }
}

@keyframes bounce {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-5px) scale(1.05);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes glow {
  0% {
    filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.3));
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tech-stack-container {
    grid-template-columns: 1fr;
  }
  
  .tech-icons {
    justify-content: center;
  }
  
  .tech-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/* Animation for the cloud effect */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* Animation for fade in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .skills-cloud {
    gap: 0.8rem;
    padding: 1.5rem 0;
  }
  
  .skill-tag {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
    margin: 0.2rem;
  }
}
