/* ===== GENERAL STYLES ===== */
:root {
  /* Professional color palette */
  --primary-color: #3a86ff;
  --primary-color-light: #61a0ff;
  --primary-color-dark: #2563eb;
  --secondary-color: #4f46e5;
  --accent-color: #8b5cf6;
  --dark-color: #111827;
  --darker-color: #0f172a;
  --light-color: #f8fafc;
  --gray-color: #94a3b8;
  --text-color: #e2e8f0;
  --border-color: #334155;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-hover-bg: rgba(255, 255, 255, 0.1);
  --gradient-bg: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

.section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.section-dark {
  background-color: var(--darker-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  position: relative;
  z-index: 2;
}

.btn {
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn span {
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.btn i {
  margin-left: 8px;
  position: relative;
  z-index: 2;
  transition: var(--transition);
  opacity: 0.8;
  transform: translateX(-5px);
}

.btn:hover i {
  transform: translateX(3px);
  opacity: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  z-index: 0;
}

.btn:hover::before {
  width: 100%;
}

.btn-primary {
  background: var(--gradient-bg);
  color: white;
  box-shadow: 0 4px 15px rgba(58, 134, 255, 0.2);
}

.btn-primary:hover {
  background: var(--gradient-bg);
  box-shadow: 0 6px 20px rgba(58, 134, 255, 0.3);
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 2px solid var(--text-color);
  color: var(--text-color);
}

.btn-outline-light:hover {
  background-color: var(--text-color);
  color: var(--dark-color);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 15px 35px;
  font-size: 1.1rem;
}

.section-heading {
  margin-bottom: 30px;
}

.section-subtitle {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}

.section-subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 2px;
  background: var(--primary-color);
  transform: translateY(-50%);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
}

.section-divider {
  width: 80px;
  height: 3px;
  background: var(--gradient-bg);
  margin: 0 auto 30px;
  border-radius: 3px;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  top: 50%;
  transform: translateY(-50%);
}

.section-divider::before {
  left: -15px;
}

.section-divider::after {
  right: -15px;
}

.section-description {
  font-size: 1.1rem;
  color: var(--gray-color);
  margin-bottom: 50px;
}

img {
  max-width: 100%;
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--darker-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader {
  display: flex;
  align-items: center;
}

.loader .circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 0 8px;
  background-color: var(--primary-color);
  animation: bounce 1.5s infinite ease-in-out both;
}

.loader .circle:nth-child(1) {
  animation-delay: -0.3s;
}

.loader .circle:nth-child(2) {
  animation-delay: -0.15s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  right: 30px;
  top: 100px;
  width: 50px;
  height: 50px;
  background: var(--gradient-bg);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
}

.theme-toggle:hover {
  transform: rotate(45deg);
}

.theme-toggle-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-icon i {
  position: absolute;
  font-size: 1.5rem;
  transition: all 0.5s ease;
}

.theme-toggle-icon .bx-sun {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle-icon .bx-moon {
  opacity: 0;
  transform: translateY(20px);
}

body.light-theme .theme-toggle-icon .bx-sun {
  opacity: 0;
  transform: translateY(-20px);
}

body.light-theme .theme-toggle-icon .bx-moon {
  opacity: 1;
  transform: translateY(0);
}

/* Light theme styles */
body.light-theme {
  background-color: #f8fafc;
  color: #1e293b;
}

body.light-theme .section-dark {
  background-color: #f1f5f9;
}

body.light-theme .navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-theme .nav-link {
  color: #1e293b;
}

body.light-theme .card-bg {
  background-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .card-hover-bg {
  background-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .text-color {
  color: #1e293b;
}

body.light-theme .border-color {
  border-color: #e2e8f0;
}

/* ===== NAVBAR ===== */
.navbar {
  background-color: transparent;
  padding: 20px 0;
  transition: var(--transition);
  z-index: 1000;
}

.navbar.scrolled {
  background-color: rgba(15, 23, 42, 0.95);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  display: flex;
  align-items: center;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-bg);
  color: white;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(58, 134, 255, 0.3);
  margin-right: 10px;
  position: relative;
  overflow: hidden;
}

.logo-text::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  top: -100%;
  left: 0;
  transition: all 0.5s ease;
}

.navbar-brand:hover .logo-text::before {
  top: 0;
}

.logo-full {
  font-weight: 600;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
}

/* Custom Hamburger Menu */
.hamburger-menu {
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.navbar-toggler {
  border: none;
  background: transparent;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Animated hamburger when menu is open */
.navbar-toggler[aria-expanded="true"] .hamburger-menu span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .hamburger-menu span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.navbar-toggler[aria-expanded="true"] .hamburger-menu span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  margin: 0 10px;
  position: relative;
  padding: 5px 0;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--gradient-bg);
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile menu animation */
.navbar-collapse {
  transition: all 0.4s ease;
}

@media (max-width: 991px) {
  .navbar-collapse {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .navbar-nav {
    text-align: center;
  }

  .nav-item {
    margin: 10px 0;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.4s forwards;
  }

  .nav-item:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-item:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-item:nth-child(3) {
    animation-delay: 0.3s;
  }
  .nav-item:nth-child(4) {
    animation-delay: 0.4s;
  }
  .nav-item:nth-child(5) {
    animation-delay: 0.5s;
  }
  .nav-item:nth-child(6) {
    animation-delay: 0.6s;
  }

  @keyframes fadeInUp {
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  background-color: var(--dark-color);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  display: flex;
  align-items: center;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-shape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  display: inline-block;
  position: relative;
  animation: fadeInUp 1s ease;
}

.hero-subtitle::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: var(--primary-color);
  transform: translateY(-50%);
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
}

.hero .highlight {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.hero .highlight::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 8px;
  background: rgba(58, 134, 255, 0.2);
  bottom: 5px;
  left: 0;
  z-index: -1;
}

.typed-text {
  font-size: 2rem;
  color: var(--gray-color);
  margin-bottom: 20px;
  display: block;
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 500px;
  animation: fadeInUp 1s ease 0.6s;
  animation-fill-mode: both;
}

.hero-btns {
  animation: fadeInUp 1s ease 0.8s;
  animation-fill-mode: both;
  display: flex;
  flex-wrap: wrap;
}

.hero-img-container {
  position: relative;
  z-index: 3;
  margin: 0 auto;
  max-width: 450px;
}

.hero-img {
  position: relative;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
}

.hero-img img {
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-img-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  top: 20px;
  left: 20px;
  border-radius: 20px;
  opacity: 0.5;
  z-index: 1;
}

.hero-img-shape-1 {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  top: -30px;
  right: -30px;
  z-index: 0;
  opacity: 0.3;
  animation: rotate 15s linear infinite;
}

.hero-img-shape-2 {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border-radius: 10px;
  bottom: -20px;
  left: -20px;
  z-index: 0;
  opacity: 0.2;
  animation: float 8s ease-in-out infinite;
}

.hero-img-shape-3 {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--secondary-color);
  border-radius: 50%;
  top: 50%;
  right: -30px;
  z-index: 0;
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

.hero-social {
  margin-top: 30px;
  display: flex;
  animation: fadeInUp 1s ease 1s;
  animation-fill-mode: both;
}

.hero-social .social-link {
  width: 40px;
  height: 40px;
  background-color: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  transition: var(--transition);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.hero-social .social-link::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  top: 100%;
  left: 0;
  transition: all 0.3s ease;
  z-index: -1;
}

.hero-social .social-link:hover {
  color: white;
  transform: translateY(-5px);
}

.hero-social .social-link:hover::before {
  top: 0;
}

/* Scroll Down Animation */
.scroll-down {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 1.5s ease 1.5s forwards;
  opacity: 0;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-color);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.wheel {
  width: 4px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 2px;
  animation: scroll 1.5s infinite;
  margin-top: 8px;
}

.arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arrow span {
  display: block;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--text-color);
  border-right: 2px solid var(--text-color);
  transform: rotate(45deg);
  margin: -5px;
  animation: arrow 1.5s infinite;
}

.arrow span:nth-child(2) {
  animation-delay: -0.2s;
}

.arrow span:nth-child(3) {
  animation-delay: -0.4s;
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(15px);
  }
}

@keyframes arrow {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-5px, -5px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(5px, 5px);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== ABOUT SECTION ===== */
.about-img-container {
  position: relative;
  margin-bottom: 30px;
}

.about-img {
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  transition: all 0.5s ease;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 500px;
}

.about-img:hover {
  transform: scale(1.02);
}

.about-img-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  top: 20px;
  left: 20px;
  border-radius: 20px;
  opacity: 0.5;
  z-index: 1;
}

.about-title {
  font-size: 2rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.about-title::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 3px;
  background: var(--gradient-bg);
  bottom: -10px;
  left: 0;
}

.experience-box {
  position: absolute;
  bottom: 30px;
  right: -20px;
  background: var(--gradient-bg);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 3;
  transition: all 0.3s ease;
}

.experience-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.experience-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.experience-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 3;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.floating-icon.icon-1 {
  top: 20%;
  left: -25px;
  color: #e34c26;
  animation: float 5s ease-in-out infinite;
}

.floating-icon.icon-2 {
  top: 50%;
  right: -25px;
  color: #264de4;
  animation: float 6s ease-in-out infinite 1s;
}

.floating-icon.icon-3 {
  bottom: 20%;
  left: 10%;
  color: #f0db4f;
  animation: float 7s ease-in-out infinite 2s;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.about-list li i {
  color: var(--primary-color);
  margin-right: 15px;
  font-size: 1.2rem;
  margin-top: 5px;
}

.about-list li div {
  flex: 1;
}

.about-list li strong {
  color: var(--primary-color);
  margin-right: 5px;
  display: block;
}

.about-list li span {
  display: block;
  transition: all 0.3s ease;
}

.about-list li:hover span {
  transform: translateX(5px);
}

.about-buttons {
  display: flex;
  flex-wrap: wrap;
}

/* ===== SKILLS SECTION ===== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.tech-item {
  text-align: center;
  padding: 25px 15px;
  background-color: var(--card-bg);
  border-radius: 15px;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.tech-item::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--gradient-bg);
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.tech-item:hover::before {
  transform: scaleX(1);
}

.tech-item:hover {
  transform: translateY(-10px);
  background-color: var(--card-hover-bg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.tech-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.tech-item:hover .tech-icon img {
  transform: scale(1.2) rotate(10deg);
}

.tech-item p {
  font-weight: 600;
  margin-bottom: 0;
  font-size: 1rem;
}

/* Tech icon specific colors */
.html-icon img {
  filter: drop-shadow(0 0 8px rgba(227, 79, 38, 0.6));
}
.css-icon img {
  filter: drop-shadow(0 0 8px rgba(38, 77, 228, 0.6));
}
.js-icon img {
  filter: drop-shadow(0 0 8px rgba(240, 219, 79, 0.6));
}
.bootstrap-icon img {
  filter: drop-shadow(0 0 8px rgba(86, 61, 124, 0.6));
}
.react-icon img {
  filter: drop-shadow(0 0 8px rgba(97, 218, 251, 0.6));
}
.node-icon img {
  filter: drop-shadow(0 0 8px rgba(104, 160, 99, 0.6));
}
.python-icon img {
  filter: drop-shadow(0 0 8px rgba(55, 118, 171, 0.6));
}
.php-icon img {
  filter: drop-shadow(0 0 8px rgba(119, 123, 179, 0.6));
}
.sql-icon img {
  filter: drop-shadow(0 0 8px rgba(0, 117, 143, 0.6));
}
.c-icon img {
  filter: drop-shadow(0 0 8px rgba(0, 122, 204, 0.6));
}
.cpp-icon img {
  filter: drop-shadow(0 0 8px rgba(0, 122, 204, 0.6));
}
.git-icon img {
  filter: drop-shadow(0 0 8px rgba(240, 80, 50, 0.6));
}

.skills-cta {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  margin-top: 30px;
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.skills-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  opacity: 0.05;
  z-index: 0;
}

.skills-cta h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.skills-cta .btn {
  position: relative;
  z-index: 1;
}

/* Tech bubbles animation */
.tech-bubbles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1;
}

.bubble {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  opacity: 0.2;
  animation: bubbleFloat linear infinite;
}

.bubble i {
  font-size: 2rem;
}

.bubble.b1 {
  width: 80px;
  height: 80px;
  background-color: #3a86ff;
  left: 10%;
  top: 20%;
  animation-duration: 15s;
}

.bubble.b2 {
  width: 60px;
  height: 60px;
  background-color: #4f46e5;
  right: 20%;
  top: 30%;
  animation-duration: 18s;
}

.bubble.b3 {
  width: 70px;
  height: 70px;
  background-color: #2563eb;
  left: 30%;
  bottom: 20%;
  animation-duration: 20s;
}

.bubble.b4 {
  width: 50px;
  height: 50px;
  background-color: #8b5cf6;
  right: 30%;
  bottom: 30%;
  animation-duration: 22s;
}

.bubble.b5 {
  width: 65px;
  height: 65px;
  background-color: #3a86ff;
  left: 40%;
  top: 60%;
  animation-duration: 25s;
}

.bubble.b6 {
  width: 55px;
  height: 55px;
  background-color: #4f46e5;
  right: 10%;
  bottom: 60%;
  animation-duration: 17s;
}

@keyframes bubbleFloat {
  0% {
    transform: translateY(100vh) scale(0.5);
  }
  100% {
    transform: translateY(-100vh) scale(1.2);
  }
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portfolio-filters li {
  margin: 0 10px 10px;
  padding: 10px 25px;
  cursor: pointer;
  border-radius: 30px;
  transition: var(--transition);
  background-color: var(--card-bg);
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.portfolio-filters li::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  top: 0;
  left: -100%;
  transition: all 0.3s ease;
  z-index: -1;
}

.portfolio-filters li:hover::before,
.portfolio-filters li.active::before {
  left: 0;
}

.portfolio-filters li:hover,
.portfolio-filters li.active {
  color: white;
  box-shadow: 0 8px 20px rgba(58, 134, 255, 0.3);
  transform: translateY(-3px);
}

.portfolio-container {
  margin-top: 30px;
}

.portfolio-card {
  margin-bottom: 30px;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  height: 300px;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-img {
  height: 100%;
  overflow: hidden;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.portfolio-card:hover .portfolio-img img {
  transform: scale(1.1);
}

.portfolio-info {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(5px);
  padding: 20px;
  transition: var(--transition);
  opacity: 0;
}

.portfolio-card:hover .portfolio-info {
  bottom: 0;
  opacity: 1;
}

.portfolio-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.portfolio-info p {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.portfolio-links {
  margin-top: 10px;
}

.portfolio-links a {
  display: inline-block;
  color: var(--text-color);
  margin-right: 10px;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  transition: var(--transition);
}

.portfolio-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px) rotate(360deg);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay-content {
  text-align: center;
  padding: 20px;
  transform: translateY(20px);
  transition: all 0.4s ease;
  opacity: 0;
}

.portfolio-card:hover .portfolio-overlay-content {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-overlay-content h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.portfolio-overlay-content p {
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.portfolio-tech {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.portfolio-tech span {
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin: 0 5px 5px;
  transition: all 0.3s ease;
}

.portfolio-tech span:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
  position: relative;
  overflow: hidden;
}

.testimonial-carousel {
  position: relative;
  z-index: 2;
}

.testimonial-item {
  padding: 30px;
}

.testimonial-img {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border: 6px solid var(--border-color);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.testimonial-img::after {
  content: "";
  position: absolute;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  top: -6px;
  left: -6px;
  animation: pulse 2s infinite;
}

.testimonial-item h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.testimonial-item h4 {
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.stars {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.quote-icon-left,
.quote-icon-right {
  color: rgba(58, 134, 255, 0.2);
  font-size: 26px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: var(--primary-color);
}

.carousel-control-prev {
  left: -60px;
}

.carousel-control-next {
  right: -60px;
}

.carousel-indicators {
  bottom: -50px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  margin: 0 5px;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

/* Testimonial shapes */
.testimonial-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
}

.testimonial-shapes .shape {
  position: absolute;
  opacity: 0.1;
}

.testimonial-shapes .shape1 {
  width: 200px;
  height: 200px;
  background: var(--primary-color);
  border-radius: 50%;
  top: -100px;
  left: -100px;
}

.testimonial-shapes .shape2 {
  width: 150px;
  height: 150px;
  background: var(--secondary-color);
  border-radius: 50%;
  bottom: -50px;
  right: -50px;
}

.testimonial-shapes .shape3 {
  width: 100px;
  height: 100px;
  background: var(--primary-color-light);
  border-radius: 10px;
  transform: rotate(45deg);
  top: 50%;
  right: 10%;
}

.testimonial-shapes .shape4 {
  width: 80px;
  height: 80px;
  background: var(--primary-color-dark);
  border-radius: 10px;
  transform: rotate(30deg);
  bottom: 20%;
  left: 10%;
}

/* ===== CONTACT SECTION ===== */
.contact-info {
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 15px;
  height: 100%;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.contact-info:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.contact-item {
  display: flex;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

.contact-item .icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 20px;
  box-shadow: 0 5px 15px rgba(58, 134, 255, 0.2);
}

.contact-item .text h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

/* Enhanced social links in contact section */
.social-links-container {
  margin-top: 30px;
  text-align: center;
}

.social-links-container h3 {
  margin-bottom: 20px;
  font-size: 1.3rem;
  position: relative;
  display: inline-block;
}

.social-links-container h3:after {
  content: "";
  position: absolute;
  width: 50%;
  height: 3px;
  background: var(--gradient-bg);
  bottom: -10px;
  left: 25%;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icon::before {
  content: attr(data-tooltip);
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}

.social-icon::after {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark-color) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.social-icon:hover::before,
.social-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

.social-icon:hover::before {
  top: -55px;
}

.social-icon:hover {
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 10px 25px rgba(58, 134, 255, 0.4);
}

.social-icon i {
  transition: all 0.3s ease;
}

.social-icon:hover i {
  animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-5px);
  }
}

/* Improved form styling */
.contact-form {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-control {
  background-color: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 15px 15px 15px 45px;
  color: var(--text-color);
  transition: var(--transition);
  font-size: 1rem;
}

.form-control:focus {
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.25);
  background-color: rgba(17, 24, 39, 0.9);
  border-left: 3px solid var(--primary-color);
  outline: none;
}

.form-control::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

body.light-theme .form-control {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--dark-color);
  border: 1px solid #e2e8f0;
}

body.light-theme .form-control:focus {
  background-color: #ffffff;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  z-index: 1;
}

textarea.form-control + .input-icon {
  top: 25px;
  transform: none;
}

.form-message {
  display: none;
  padding: 10px;
  border-radius: 5px;
  font-weight: 500;
}

.form-message.success {
  display: block;
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.form-message.error {
  display: block;
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Contact shapes */
.contact-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1;
}

.contact-shapes .shape {
  position: absolute;
  opacity: 0.05;
}

.contact-shapes .shape1 {
  width: 300px;
  height: 300px;
  background: var(--primary-color);
  border-radius: 50%;
  top: -150px;
  right: -150px;
}

.contact-shapes .shape2 {
  width: 200px;
  height: 200px;
  background: var(--secondary-color);
  border-radius: 10px;
  transform: rotate(45deg);
  bottom: -100px;
  left: -100px;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--darker-color);
  padding: 50px 0 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 1;
}

.footer-logo {
  font-size: 2rem;
  margin-bottom: 20px;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  z-index: 2;
}

.footer-social {
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.footer-social a {
  width: 45px;
  height: 45px;
  background: var(--gradient-bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  transition: var(--transition);
  color: white;
}

.footer-social a:hover {
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 10px 25px rgba(58, 134, 255, 0.4);
}

.copyright {
  font-size: 0.9rem;
  color: var(--gray-color);
  position: relative;
  z-index: 2;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-bg);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(58, 134, 255, 0.4);
}

.back-to-top i {
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
}

.back-to-top-circle {
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  transition: all 0.8s ease;
}

.back-to-top.active .back-to-top-circle {
  stroke-dashoffset: 0;
  animation: rotate 4s linear infinite;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Responsive improvements for social icons */
@media (max-width: 767px) {
  .social-links {
    gap: 10px;
  }

  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .social-links {
    gap: 8px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1199px) {
  .hero-title {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .carousel-control-prev {
    left: -20px;
  }

  .carousel-control-next {
    right: -20px;
  }
}

@media (max-width: 991px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero .typed-text {
    font-size: 1.6rem;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .experience-box {
    right: 0;
  }

  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }

  .theme-toggle {
    right: 20px;
    top: 90px;
  }

  .logo-full {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero {
    padding-top: 100px;
    padding-bottom: 50px;
    height: auto;
    min-height: 100vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero .typed-text {
    font-size: 1.3rem;
  }

  .hero-img-container {
    margin-top: 30px;
    max-width: 80%;
  }

  .hero-img img {
    max-height: 350px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .experience-box {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 20px;
    display: inline-block;
  }

  .about-buttons {
    flex-direction: column;
  }

  .about-buttons .btn {
    margin-bottom: 15px;
    margin-left: 0 !important;
  }

  .portfolio-filters li {
    margin-bottom: 10px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    right: 15px;
    top: 80px;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-item .icon {
    margin: 0 auto 15px;
  }
}

@media (max-width: 575px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero .typed-text {
    font-size: 1.1rem;
  }

  .hero-btns {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-btns .btn {
    margin-bottom: 15px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .floating-icon {
    display: none;
  }

  .scroll-down {
    display: none;
  }

  .hero-img-container {
    max-width: 100%;
  }

  .hero-img img {
    max-height: 300px;
  }

  .hero-img-shape-1,
  .hero-img-shape-2,
  .hero-img-shape-3 {
    display: none;
  }
}
