@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Theme Variables */
:root {
  --bg-color: #ffffff;
  --bg-color-secondary: #f8fafc;
  --text-color: #1a1a1a;
  --text-color-secondary: #4a5568;
  --section-bg-opacity: 0.1;
  --border-color: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.1);
  --hero-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(147, 51, 234, 0.9));
  --link-color: #4f46e5;
  --link-hover-color: #4338ca;
}

/* Dark Theme Colors */
body.dark {
  background-color: var(--bg-color);
  color: var(--text-color);
  background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
  --bg-color: rgba(15, 23, 42, 0.9);
  --bg-color-secondary: #1e293b;
  --text-color: #ffffff;
  --text-color-secondary: #cbd5e1;
  --section-bg-opacity: 0.15;
  --border-color: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(30, 41, 59, 0.5);
  --card-border: rgba(255, 255, 255, 0.1);
  --hero-bg: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(88, 28, 135, 0.95));
  --link-color: #818cf8;
  --link-hover-color: #a5b4fc;
}

/* Light Theme Colors */
body.light {
  background-color: var(--bg-color);
  color: var(--text-color);
  background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80&brightness=120');
  --bg-color: rgba(255, 255, 255, 0.9);
  --bg-color-secondary: #f8fafc;
  --text-color: #1a1a1a;
  --text-color-secondary: #4a5568;
  --section-bg-opacity: 0.08;
  --border-color: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(0, 0, 0, 0.05);
  --card-border: rgba(0, 0, 0, 0.1);
  --hero-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(147, 51, 234, 0.95));
}

/* Apply Theme Colors */
html,
body {
  background-color: var(--bg-color);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
}

/* Base styles with theme support */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-color);
}

p,
li {
  color: var(--text-color-secondary);
}

a {
  color: var(--link-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--link-hover-color);
}

/* Style updates for theme compatibility */
.hero {
  background: var(--hero-bg);
}

.section {
  position: relative;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.section-skills {
  background: linear-gradient(135deg, rgba(124, 58, 237, var(--section-bg-opacity)), rgba(67, 56, 202, var(--section-bg-opacity)));
}

.section-work {
  background: linear-gradient(135deg, rgba(14, 165, 233, var(--section-bg-opacity)), rgba(56, 189, 248, var(--section-bg-opacity)));
}

.section-education {
  background: linear-gradient(135deg, rgba(239, 68, 68, var(--section-bg-opacity)), rgba(219, 39, 119, var(--section-bg-opacity)));
}

.section-projects {
  background: linear-gradient(135deg, rgba(5, 150, 105, var(--section-bg-opacity)), rgba(147, 51, 234, var(--section-bg-opacity)));
}

.section-contact {
  background: linear-gradient(135deg, rgba(79, 70, 229, var(--section-bg-opacity)), rgba(16, 185, 129, var(--section-bg-opacity)));
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  margin-bottom: 1.5rem;
  border: 4px solid var(--border-color);
  object-fit: cover;
  background: var(--card-bg);
}

.skill-category,
.project-card,
.timeline-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

a {
  color: var(--text-color);
}

.form-input {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.contact-item,
.social-icon {
  color: var(--text-color);
}

.submit-btn {
  background: var(--hero-bg);
  color: #ffffff;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4f46e5, #10b981);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 1.2rem;
}

.floating-btn {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle .tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  right: 60px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.theme-toggle:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* Section Enhancements */
.section {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Enhanced Contact Section Styles */
.contact-form {
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  cursor: text;
  z-index: 10;
  position: relative;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-color-secondary);
  box-shadow: 0 0 15px rgba(255, 111, 97, 0.2);
}

textarea.form-input {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

/* Enhanced Social Icons */
.social-icon {
  position: relative;
  margin: 0 15px;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px);
}

.social-icon::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.social-icon:hover::before {
  opacity: 1;
  visibility: visible;
  bottom: -30px;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: 0.8s;
}

.section:hover::before {
  left: 100%;
}

/* Gradient Border Animation */
.section::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 2px;
  background: linear-gradient(45deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0.1));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Custom Cursor */
.cursor-dot,
.cursor-dot-outline {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  z-index: 5;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
}

.cursor-dot-outline {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 111, 97, 0.1);
  border: 2px solid var(--accent-primary);
}

:root {
  --bg-primary: #1e3c72;
  --bg-secondary: #2a5298;
  --text-primary: #ffffff;
  --text-secondary: #b3c6ff;
  --accent-primary: #ff6f61;
  --accent-secondary: #ffb347;
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.2);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --gradient-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
}

.light-theme {
  --bg-primary: #f5f7fa;
  --bg-secondary: #c3cfe2;
  --text-primary: #2a2a2a;
  --text-secondary: #555555;
  --accent-primary: #ff6f61;
  --accent-secondary: #ff8f7d;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --gradient-overlay: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
}

/* Particle Animation */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-20vh) scale(1);
    opacity: 0;
  }
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  background-blend-mode: soft-light;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;

  b.project-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
  }

  color: var(--text-color);
  scroll-behavior: smooth;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-color-secondary);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #ff6f61;
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.btn:hover {
  background: #ff3b2e;
}

.section {
  padding: 6rem 0 4rem 0;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
  border-radius: 30px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      transparent);
  transform: skewX(-15deg);
  transition: 0.5s;
}

.section:hover::before {
  left: 150%;
  transition: 0.8s;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #ffb347;
}

.skills {
  margin-top: 2rem;
}

.skill {
  margin-bottom: 1rem;
}

.skill span {
  display: inline-block;
  width: 120px;
}

.skill-bar {
  display: inline-block;
  height: 16px;
  width: 0;
  background: linear-gradient(90deg, #ffb347 0%, #ff6f61 100%);
  border-radius: 8px;
  vertical-align: middle;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1.2rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transform-style: preserve-3d;
}

.skill-category:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
  box-shadow:
    -5px -5px 20px rgba(255, 255, 255, 0.1),
    5px 5px 20px rgba(0, 0, 0, 0.2);
}

.skill-category h3 {
  color: #ffb347;
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-category li {
  margin-bottom: 0.4rem;
  color: var(--text-color-secondary);
  font-size: 1rem;
  padding-left: 1.2em;
  position: relative;
}

.skill-category li::before {
  content: "•";
  color: #ff6f61;
  position: absolute;
  left: 0;
}

.timeline {
  border-left: 3px solid var(--accent-primary);
  margin-left: 1rem;
  padding-left: 2rem;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  margin-bottom: 2.5rem;
  position: relative;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow-color);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
}

@keyframes pulseGlow {
  0% {
    box-shadow:
      0 0 0 2px #ffb347,
      0 0 15px rgba(255, 111, 97, 0.5);
  }

  50% {
    box-shadow:
      0 0 0 2px #ffb347,
      0 0 25px rgba(255, 111, 97, 0.8);
  }

  100% {
    box-shadow:
      0 0 0 2px #ffb347,
      0 0 15px rgba(255, 111, 97, 0.5);
  }
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.timeline-content h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1.2rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.company {
  display: block;
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.timeline-content ul {
  margin: 1rem 0 0 1.2rem;
  padding: 0;
  color: var(--text-color-secondary);
  font-size: 0.95rem;
  list-style-type: none;
}

.timeline-content li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.timeline-content li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* Modern Enhancements */
.contact-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px var(--shadow-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: #ffb347;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-icon {
  color: var(--text-color);
  font-size: 1.8rem;
  transition: transform 0.3s, color 0.3s;
}

.social-icon:hover {
  color: #ffb347;
  transform: translateY(-5px);
}

/* Enhanced Project Cards */
.project-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.project-card::before,
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%,
      rgba(255, 255, 255, 0.1),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
}

.project-card::after {
  background: radial-gradient(circle at 50% 100%,
      rgba(255, 255, 255, 0.1),
      transparent 40%);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: 0.5s;
}

.project-card:hover {
  transform: translateY(-15px) rotateX(10deg);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 15px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.project-card:hover::before,
.project-card:hover::after {
  opacity: 1;
}

.project-card:hover::before {
  left: 100%;
}

/* Enhanced Visual Effects */
.btn {
  background: linear-gradient(45deg, #ff6f61, #ff3b2e);
  border: none;
  padding: 1rem 2.5rem;
  color: white;
  border-radius: 50px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 111, 97, 0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 111, 97, 0.6);
}

.btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s;
}

.btn:hover::before {
  transform: scale(1);
}

/* Neon glow effect for headings */
h2 {
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.5),
    0 0 20px rgba(255, 179, 71, 0.3),
    0 0 30px rgba(255, 179, 71, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #ff6f61, #ff3b2e);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #ff3b2e, #ff6f61);
}

/* Animations */
.animate-fadein {
  animation: fadein 1.2s ease;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slidein {
  animation: slidein 1.2s 0.3s backwards;
}

@keyframes slidein {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-bounce {
  animation: bounce 1.5s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-10px);
  }
}

.animate-pop {
  animation: pop 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}