/* Base Styles */
:root {
  --primary-color: #4a63e7;
  --primary-dark: #3a50c7;
  --primary-light: #6a8bff;
  --secondary-color: #6c757d;
  --accent-color: #ff6b6b;
  --accent-dark: #ff5252;
  --accent-light: #ff9d9d;
  --background-color: #ffffff;
  --card-background: #ffffff;
  --dark-background: #1a1a2e;
  --text-color: #333333;
  --light-text: #f8f9fa;
  --border-color: #e9ecef;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --gradient-primary: linear-gradient(135deg, #4a63e7 0%, #6a8bff 100%);
  --gradient-accent: linear-gradient(135deg, #ff6b6b 0%, #ff9d9d 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #3a3a5c 100%);
}

/* Dark Mode Variables */
.dark-mode {
  --primary-color: #6a8bff;
  --primary-dark: #4a63e7;
  --primary-light: #8aa8ff;
  --secondary-color: #a0a0a0;
  --accent-color: #ff8a8a;
  --accent-dark: #ff6b6b;
  --accent-light: #ffb3b3;
  --background-color: #121212;
  --card-background: #1e1e1e;
  --dark-background: #0a0a0a;
  --text-color: #f0f0f0;
  --light-text: #ffffff;
  --border-color: #2a2a2a;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.section-header h2::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 8px;
  background-color: rgba(74, 99, 231, 0.1);
  bottom: 5px;
  left: 0;
  z-index: -1;
}

.underline {
  height: 4px;
  width: 70px;
  background: var(--accent-color);
  margin: 0 auto;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.underline::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  animation: underline-slide 3s ease-in-out infinite;
}

@keyframes underline-slide {
  0%,
  100% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.primary-btn {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(74, 99, 231, 0.3);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #3a50c7 0%, #5a7bef 100%);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(74, 99, 231, 0.4);
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.secondary-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--primary-color);
  transition: all 0.4s ease;
  z-index: -1;
}

.secondary-btn:hover {
  color: white;
}

.secondary-btn:hover::after {
  width: 100%;
}

.small-btn {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.view-btn {
  padding: 8px 20px;
  background: var(--gradient-accent);
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.view-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #ff8a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(255, 107, 107, 0.4);
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-accent);
  width: 0%;
  z-index: 1001;
  transition: width 0.2s ease;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--gradient-accent);
  transform: translateY(-5px);
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
}

.theme-toggle:hover {
  background: var(--gradient-accent);
  transform: translateY(-5px);
}

.theme-toggle i {
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover i {
  transform: rotate(360deg);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(74, 99, 231, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--box-shadow);
  z-index: 1000;
  padding: 15px 0;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dark-mode header {
  background-color: rgba(18, 18, 18, 0.95);
}

header.sticky {
  padding: 10px 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dark-mode header.sticky {
  background-color: rgba(18, 18, 18, 0.98);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  transition: var(--transition);
}

.logo h1::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background: var(--accent-color);
  transition: var(--transition);
}

.logo:hover h1 {
  transform: translateY(-3px);
}

.logo:hover h1::after {
  width: 100%;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 255, 0.9) 100%);
}

.dark-mode .hero {
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.9) 0%, rgba(26, 26, 38, 0.9) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 20% 30%, rgba(74, 99, 231, 0.05) 0%, transparent 200px),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.05) 0%, transparent 200px);
  z-index: -1;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.hero-text {
  flex: 1;
  position: relative;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.hero-text h1 span {
  color: var(--primary-color);
  position: relative;
}

.hero-text h1 span::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 8px;
  background-color: rgba(74, 99, 231, 0.1);
  bottom: 5px;
  left: 0;
  z-index: -1;
}

.hero-text h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  position: relative;
  padding-left: 15px;
}

.hero-text p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.image-container {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid transparent;
  background: linear-gradient(white, white) padding-box, var(--gradient-primary) border-box;
  animation: float 3s ease-in-out infinite;
  position: relative;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.dark-mode .image-container {
  background: linear-gradient(var(--card-background), var(--card-background)) padding-box, var(--gradient-primary)
    border-box;
}

.image-container:hover {
  transform: scale(1.03) translateY(-10px);
  box-shadow: 0 30px 40px rgba(0, 0, 0, 0.15);
}

.image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(74, 99, 231, 0.2) 0%, rgba(255, 107, 107, 0.2) 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

.image-container:hover::before {
  opacity: 1;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

.social-icons {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.social-icons a {
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--card-background);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-icons a:hover {
  color: white;
  background-color: var(--primary-color);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(74, 99, 231, 0.3);
}

/* Typing Animation */
.typing-text {
  position: relative;
  display: inline-block;
}

.typing-text::after {
  content: "|";
  position: absolute;
  right: -8px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* About Section */
.about {
  background-color: #f8f9fa;
  position: relative;
}

.dark-mode .about {
  background-color: #1a1a1a;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 80% 20%, rgba(74, 99, 231, 0.05) 0%, transparent 200px),
    radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 200px);
  z-index: 0;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  position: relative;
  z-index: 1;
}

.about-image {
  flex: 1;
  position: relative;
  transition: var(--transition);
  padding-top: 15px;
  padding-left: 15px;
  margin-bottom: 15px;
}

.about-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* border: 3px solid var(--primary-color);
  border-radius: var(--border-radius); */
  z-index: -1;
  transition: var(--transition);
}

.about-image:hover::before {
  top: -10px;
  left: -10px;
}

.about-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

.about-image:hover img {
  transform: scale(1.02);
  box-shadow: var(--hover-shadow);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.about-text h3::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 3px;
  background: var(--gradient-primary);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

.about-text:hover h3::after {
  width: 100%;
}

.about-text p {
  margin-bottom: 20px;
  position: relative;
  padding-left: 0;
  transition: var(--transition);
}

.about-text p:hover {
  transform: translateX(5px);
}

.about-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.detail {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  padding: 10px;
  border-radius: var(--border-radius);
}

.detail:hover {
  background-color: var(--card-background);
  box-shadow: var(--box-shadow);
  transform: translateY(-5px);
}

.detail i {
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.detail:hover i {
  transform: scale(1.2);
}

/* Skills Section */
.skills-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.skill-category {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: 1;
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: var(--hover-shadow);
}

.skill-category:hover::before {
  height: 10px;
}

.skill-category h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.skill-category h3::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

.skill-category:hover h3::after {
  width: 100%;
}

.skill-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.skill-item {
  text-align: center;
  transition: var(--transition);
  padding: 15px 10px;
  border-radius: var(--border-radius);
}

.skill-item:hover {
  background-color: rgba(74, 99, 231, 0.05);
  transform: translateY(-5px);
}

.dark-mode .skill-item:hover {
  background-color: rgba(74, 99, 231, 0.15);
}

.skill-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  transition: var(--transition);
}

.skill-item:hover .skill-icon {
  transform: scale(1.2);
  color: var(--accent-color);
}

.skill-item h4 {
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.skill-item:hover h4 {
  color: var(--primary-color);
  font-weight: 600;
}

/* Experience Section */
.experience {
  background-color: #f8f9fa;
  position: relative;
}

.dark-mode .experience {
  background-color: #1a1a1a;
}

.experience::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 30% 30%, rgba(74, 99, 231, 0.05) 0%, transparent 200px),
    radial-gradient(circle at 70% 70%, rgba(255, 107, 107, 0.05) 0%, transparent 200px);
  z-index: 0;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background: var(--gradient-primary);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  left: 0;
  margin-bottom: 30px;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--accent-color);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
  right: -10px;
  transition: var(--transition);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.2);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  background-color: var(--primary-color);
  box-shadow: 0 0 0 6px rgba(74, 99, 231, 0.3);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-date {
  position: absolute;
  top: 12px;
  right: -200px;
  width: 150px;
  text-align: left;
  transition: var(--transition);
}

.timeline-item:hover .timeline-date {
  transform: translateX(5px);
}

.timeline-item:nth-child(even) .timeline-date {
  left: -200px;
  text-align: right;
}

.timeline-item:nth-child(even):hover .timeline-date {
  transform: translateX(-5px);
}

.timeline-date h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--transition);
}

.timeline-item:hover .timeline-date h3 {
  color: var(--accent-color);
}

.timeline-content {
  padding: 20px;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: -1;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.timeline-content:hover::before {
  width: 100%;
  opacity: 0.05;
}

.timeline-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-color);
  transition: var(--transition);
}

.timeline-content:hover h3 {
  color: var(--accent-color);
}

.timeline-content h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--hover-shadow);
}

.project-card:hover::before {
  height: 10px;
}

.project-img {
  height: 250px;
  overflow: hidden;
  position: relative;
}

.project-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(74, 99, 231, 0.7) 0%, rgba(255, 107, 107, 0.7) 100%);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-img::after {
  opacity: 0.2;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-content {
  padding: 20px;
  position: relative;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-color);
  transition: var(--transition);
}

.project-card:hover .project-content h3 {
  color: var(--accent-color);
}

.project-date {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.project-tech span {
  background-color: rgba(74, 99, 231, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.dark-mode .project-tech span {
  background-color: rgba(74, 99, 231, 0.2);
}

.project-tech span:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(74, 99, 231, 0.3);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

/* Certificates Section */
.certificates {
  background-color: #f8f9fa;
  position: relative;
  padding: 100px 0;
}

.dark-mode .certificates {
  background-color: #1a1a1a;
}

.certificates::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 20% 20%, rgba(74, 99, 231, 0.05) 0%, transparent 200px),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 200px);
  z-index: 0;
}

.certificate-carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 40px;
  z-index: 1;
  overflow: hidden;
  padding: 20px 0;
}

.certificate-carousel {
  display: flex;
  transition: transform 0.5s ease;
  gap: 20px;
  padding: 10px 0;
}

.certificate-slide {
  min-width: calc(33.333% - 20px);
  flex: 0 0 calc(33.333% - 20px);
  transition: all 0.4s ease;
  transform-origin: center center;
}

.certificate-slide:hover {
  transform: translateY(-10px) scale(1.03);
  z-index: 5;
}

.certificate-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: all 0.4s ease;
  height: 100%;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .certificate-card {
  border-color: rgba(255, 255, 255, 0.05);
}

.certificate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-accent);
  transition: var(--transition);
  z-index: 1;
}

.certificate-card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border-color: rgba(74, 99, 231, 0.1);
}

.certificate-card:hover::before {
  height: 10px;
}

.certificate-img {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.certificate-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(74, 99, 231, 0.7) 0%, rgba(255, 107, 107, 0.7) 100%);
  opacity: 0;
  transition: var(--transition);
}

.certificate-card:hover .certificate-img::after {
  opacity: 0.2;
}

.certificate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.certificate-card:hover .certificate-img img {
  transform: scale(1.1);
}

.certificate-content {
  padding: 20px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.certificate-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-color);
  transition: var(--transition);
  line-height: 1.4;
}

.certificate-card:hover .certificate-content h3 {
  color: var(--accent-color);
}

.certificate-content p {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-primary);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(74, 99, 231, 0.3);
  font-size: 1.2rem;
}

.carousel-btn:hover {
  background: var(--gradient-accent);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.carousel-btn:focus {
  outline: none;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.view-all-container {
  text-align: center;
  margin-top: 40px;
  position: relative;
  z-index: 2;
}

#view-all-certificates {
  padding: 15px 35px;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

#view-all-certificates:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(74, 99, 231, 0.3);
}

#view-all-certificates::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  z-index: -1;
}

#view-all-certificates:hover::before {
  left: 100%;
}

/* Certificate indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(74, 99, 231, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background-color: var(--accent-color);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--card-background);
  margin: 5% auto;
  padding: 40px;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 1200px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modal-appear 0.4s ease-out;
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
  font-size: 2.2rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.modal-content h2::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 4px;
  background: var(--gradient-accent);
  bottom: -10px;
  left: 25%;
  border-radius: 2px;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 107, 107, 0.1);
  color: var(--accent-color);
}

.close-modal:hover {
  background-color: var(--accent-color);
  color: white;
  transform: rotate(90deg);
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

/* Certificate card in grid */
.certificate-grid .certificate-card {
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

.certificate-grid .certificate-card:nth-child(3n + 1) {
  animation-delay: 0.1s;
}

.certificate-grid .certificate-card:nth-child(3n + 2) {
  animation-delay: 0.2s;
}

.certificate-grid .certificate-card:nth-child(3n + 3) {
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Certificate counter badge */
.certificate-counter {
  position: absolute;
  top: 40px;
  right: 40px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 30px;
  padding: 8px 20px;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(74, 99, 231, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 99, 231, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(74, 99, 231, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 99, 231, 0);
  }
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.achievement-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  display: flex;
  gap: 20px;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.achievement-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gradient-accent);
  transition: var(--transition);
  z-index: -1;
}

.achievement-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--hover-shadow);
}

.achievement-card:hover::before {
  width: 100%;
  opacity: 0.05;
}

.achievement-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  transition: var(--transition);
}

.achievement-card:hover .achievement-icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--primary-color);
}

.achievement-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-color);
  transition: var(--transition);
}

.achievement-card:hover .achievement-content h3 {
  color: var(--accent-color);
}

.achievement-date {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

/* Education Section */
.education {
  background-color: #f8f9fa;
  position: relative;
}

.dark-mode .education {
  background-color: #1a1a1a;
}

.education::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 70% 30%, rgba(74, 99, 231, 0.05) 0%, transparent 200px),
    radial-gradient(circle at 30% 70%, rgba(255, 107, 107, 0.05) 0%, transparent 200px);
  z-index: 0;
}
/* Education Buttons */
.education-buttons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.edu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.edu-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: all 0.3s ease;
  z-index: -1;
}

.edu-btn:hover::before {
  transform: translateX(0);
}

.edu-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.edu-btn:hover i {
  transform: rotate(20deg) scale(1.2);
}

.edu-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.certificate-btn {
  background: linear-gradient(135deg, #4a63e7 0%, #6a8bff 100%);
  color: white;
}

.certificate-btn:hover {
  background: linear-gradient(135deg, #3a50c7 0%, #5a7bef 100%);
}

.marksheet-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff9d9d 100%);
  color: white;
}

.marksheet-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #ff8a8a 100%);
}

/* Dark mode adjustments */
.dark-mode .edu-btn {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .edu-btn:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .education-buttons {
      gap: 10px;
      margin-top: 12px;
  }
  
  .edu-btn {
      padding: 6px 12px;
      font-size: 0.8rem;
  }
  
  .edu-btn i {
      font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .education-buttons {
      flex-direction: column;
      gap: 8px;
      align-items: flex-start;
  }
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  padding: 15px;
  border-radius: var(--border-radius);
}

.contact-item:hover {
  background-color: var(--card-background);
  box-shadow: var(--box-shadow);
  transform: translateY(-5px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(10deg);
  background: var(--gradient-accent);
}

.contact-text h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-color);
  transition: var(--transition);
}

.contact-item:hover .contact-text h3 {
  color: var(--accent-color);
}

.contact-form {
  background-color: var(--card-background);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.contact-form:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-5px);
}

.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: -1;
}

.contact-form:hover::before {
  height: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--background-color);
  color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 99, 231, 0.1);
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: var(--dark-background);
  color: var(--light-text);
  padding: 60px 0 20px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-primary);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.footer-logo h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.footer-logo h2::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  background: var(--gradient-accent);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

.footer-logo:hover h2::after {
  width: 100%;
}

.footer-links h3,
.footer-social h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
}

.footer-links h3::after,
.footer-social h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-accent);
  transition: var(--transition);
}

.footer-links:hover h3::after,
.footer-social:hover h3::after {
  width: 100px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  position: relative;
  padding-left: 15px;
  transition: var(--transition);
}

.footer-links a::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 20px;
}

.footer-links a:hover::before {
  opacity: 1;
}

.footer-social .social-icons {
  position: static;
  flex-direction: row;
  transform: none;
}

.footer-social .social-icons a {
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icons a:hover {
  background-color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.footer-bottom p {
  position: relative;
  display: inline-block;
}

.footer-bottom p::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  background-color: var(--accent-color);
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  transition: var(--transition);
}

.footer-bottom:hover p::after {
  width: 100%;
}

/* Animation classes */
.animate-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Success message styling */
.success-message {
  text-align: center;
  padding: 30px 20px;
  animation: fadeIn 0.5s ease-out;
}

.success-icon {
  font-size: 4rem;
  color: #4caf50;
  margin-bottom: 20px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Form focus effect */
.form-group.focused input,
.form-group.focused textarea {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 99, 231, 0.1);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  html {
    font-size: 15px;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .image-container {
    width: 350px;
    height: 350px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }
}

@media (max-width: 1024px) {
  html {
    font-size: 14px;
  }

  section {
    padding: 70px 0;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text h2 {
    font-size: 1.5rem;
  }

  .image-container {
    width: 320px;
    height: 320px;
  }

  .social-icons {
    left: 15px;
  }

  .skills-content {
    grid-template-columns: 1fr;
  }

  .certificate-slide {
    min-width: calc(50% - 20px);
    flex: 0 0 calc(50% - 20px);
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    font-size: 13px;
  }

  section {
    padding: 60px 0;
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--card-background);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    z-index: 1000;
  }

  .nav-links.active {
    left: 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .social-icons {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 30px;
  }

  .about-content {
    flex-direction: column;
  }

  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-dot {
    left: 20px;
    right: auto;
  }

  .timeline-item:nth-child(even) .timeline-dot {
    left: 20px;
  }

  .timeline-date {
    position: static;
    width: auto;
    text-align: left;
    margin-bottom: 10px;
  }

  .timeline-item:nth-child(even) .timeline-date {
    left: auto;
    text-align: left;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .certificate-slide {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .back-to-top,
  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .back-to-top {
    right: 20px;
    bottom: 20px;
  }

  .theme-toggle {
    left: 20px;
    bottom: 20px;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 12px;
  }

  section {
    padding: 50px 0;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.3rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .image-container {
    width: 280px;
    height: 280px;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

  .skill-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .certificate-counter {
    top: 20px;
    right: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 20px;
  }

  .close-modal {
    top: 10px;
    right: 10px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 11px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .image-container {
    width: 250px;
    height: 250px;
  }

  .skill-items {
    grid-template-columns: 1fr;
  }
}
