:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --danger-color: #e74c3c;
  --success-color: #2ecc71;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--light-color);
  color: var(--dark-color);
  line-height: 1.6;
  transition: var(--transition);
}

body.dark-mode {
  background-color: var(--dark-color);
  color: var(--light-color);
}

body .curzor {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  position: fixed;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.7);
  /* mix-blend-mode: difference; */
  opacity: 0.8;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: float-pop 2s ease-out forwards;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  /* mix-blend-mode: screen; better glowing effect on dark bg */
  /* height: 8px;
  width: 8px; */
}

@keyframes float-pop {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.9;
  }
  50% {
    transform: translate(calc(var(--tx) * 0.5), calc(var(--ty) * 0.5))
      scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.5);
    opacity: 0;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

body.dark-mode header {
  background-color: rgba(44, 62, 80, 0.9);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

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

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

body.dark-mode .nav-links a {
  color: var(--light-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

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

.theme-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--dark-color);
  transition: var(--transition);
}

body.dark-mode .theme-toggle {
  color: var(--light-color);
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 24px;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(52, 152, 219, 0.1) 0%,
    rgba(46, 204, 113, 0.1) 100%
  );
  z-index: -1;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  padding-right: 20px;
  animation: fadeInLeft 1s ease;
}

.hero-image {
  flex: 1;
  text-align: center;
  animation: fadeInRight 1s ease;
  width: 400px;
  height: 400px;
}

.hero-image img {
  height: 100%;
  width: 400px;
  object-position: right;
  object-fit: cover;
  border-radius: 50%;
  /* box-shadow: ; */
  transition: var(--transition);
  box-shadow: 1px 1px 15px 3px #3498db, -1px -1px 15px 3px #3498db;
}

.hero-image img:hover {
  transform: scale(1.05);
}

h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}

h1 span {
  color: var(--primary-color);
}

.typing-text {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  height: 30px;
}

.social-icons {
  display: flex;
  margin-top: 30px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  margin-right: 15px;
  text-decoration: none;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  margin: 10px 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-20deg);
  transition: 0.75s;
  z-index: 0;
}

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

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

/* About Section */
body.dark-mode .about {
  background-image: url('https://wallpaperaccess.com/full/4230797.jpg');
}

.about{
  padding: 100px 0;
  background-image: url('https://wallpaperaccess.com/full/4406984.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  font-size: 36px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
}

.about-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
}

.about-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: var(--box-shadow);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.skills {
  margin-top: 30px;
}

.skill-item {
  margin-bottom: 20px;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.skill-bar {
  height: 10px;
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
}

body.dark-mode .skill-bar {
  background-color: #555;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 5px;
  transition: width 1.5s ease;
}

.skill-progress {
  max-width: 0;
  transition: all 2s linear;
}

.skill-progress.load {
  max-width: 95%;
}

/* Skill scetion */
.skill-conatiner {
  padding: 20px;
  background: #f5f5f5;
  border-radius: 12px;
  max-width: 100%;
  color: var(--dark-color);
  transition: var(--transition);
}


body.dark-mode .skill-conatiner {
  background-color: rgba(44, 62, 80, 0.5);
  color: #ddd;
}

.skill-heading {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.skill-desc {
  text-align: center;
  font-size: 14px;
  margin-bottom: 20px;
}

.skill-cards {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px;
  scroll-behavior: smooth;
  height: 220px;
}

body.dark-mode .skill-cards div {
  background-color: #34495e;
  color: #ddd;
}

.skill-cards::-webkit-scrollbar {
  height: 8px;
}
.skill-cards::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 10px;
}
.skill-cards::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}
.skill-cards::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.skill-cards div {
  min-width: 150px; 
  height: 150px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
  /* position: relative; */
}

.skill-cards div:hover {
  transform: translateY(-5px);
}

.skill-cards img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  object-fit: contain;
}

.skill-cards p {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}


/* Certificate scetion */
.certificate-conatiner {
  padding: 20px;
  background: #ecf0f1;
  border-radius: 12px;
  /* max-width: 100%; */
  width: 100%;
  min-width: 1000px;
  color: var(--dark-color);
  transition: var(--transition);
  overflow-x: scroll;
  scrollbar-width: 0px;
}

body.dark-mode .certificate-conatiner {
  background-color: rgba(44, 62, 80, 0.5);
  color: #ddd;
}

.certificate-heading {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.certificate-desc {
  text-align: center;
  font-size: 14px;
  margin-bottom: 20px;
}

.certificate-cards {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 50px;
  overflow-x: scroll;
  scrollbar-width: none;
  padding: 10px;
  scroll-behavior: smooth;

}

.certificate-cards::-webkit-scrollbar {
  height: 8px;
}
.certificate-cards::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 10px;
}
.certificate-cards::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}
.certificate-cards::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.certificate-cards div {
  min-width: fit-content; 
  width: 300px;
  height: 212px;
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
  /* position: relative; */
}

.certificate-cards div:hover {
  transform: translateY(-5px);
}

.certificate-cards img {
  width: 300px;
  height: fit-content;
  object-fit: contain;
  background-color: white;
}

.certificate-cards p {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* Projects Section */
.projects {
  padding: 100px 0;
  background-color: rgba(52, 152, 219, 0.05);
}

body.dark-mode .projects {
  background-color: rgba(44, 62, 80, 0.5);
}

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

.project-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 3px solid black;
  position: relative;
}

body.dark-mode .project-card {
  background-color: #34495e;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgb(0, 0, 0);
  color: gold;
  padding: 0 5px;
  border-radius: 10px;
}

.project-image {
  height: 200px;
  overflow: hidden;
  background-color: white;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
  background-color: white;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-info {
  padding: 20px;
  border-top: 5px solid black;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.tag {
  padding: 5px 10px;
  background-color: #61dafb;
  color: rgb(0, 0, 0);
  border-radius: 20px;
  font-size: 12px;
}

.project-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.project-links a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
}

body.dark-mode .project-links a {
  color: var(--light-color);
}

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

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  position: relative;
  bottom: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  position: absolute;
  top: -5px;
  right: 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: red;
}

.project-modal-image {
  width: 100%;
  height: 300px;
}

.project-modal-image img {
  width: 100%;
  height: 300px;
}

.more-btn {
  background-color: #1565c0;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}

.projects-small-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 25px;
  overflow-x: scroll;
  margin-top: 50px;
  padding: 10px 20px;
}

.small-project-card {
  min-width: 360px;
  min-height: 320px;
  background-color: #000000;
  color: #ffffff;
  box-shadow: 1px 1px 10px 3px gray;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}

.small-project-card img {
  width: 100%;
  height: auto;
}

.small-project-card .project-small-links {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 0 10px;
}

.small-project-card .project-small-links a {
  text-decoration: none;
  color: rgb(189, 156, 49);
  font-weight: 500;
  transition: var(--transition);
}

/* Contact Section */
.contact {
  padding: 100px 0;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info h3 {
  margin-bottom: 20px;
  font-size: 24px;
}

.contact-details {
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.contact-item i {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: var(--transition);
}

body.dark-mode .form-control {
  background-color: #34495e;
  border-color: #555;
  color: var(--light-color);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

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

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn-cv {
  background-color: var(--secondary-color);
}

.btn-cv:hover {
  background-color: #27ae60; /* Darker green */
}

.floating-cv-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.floating-cv-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Toast notification styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toast.success {
    background-color: #4CAF50;
}

.toast.error {
    background-color: #F44336;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Spinner animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 30px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  display: flex;
  list-style: none;
  margin: 20px 0;
}

.footer-links li {
  margin: 0 15px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.copyright {
  margin-top: 20px;
  font-size: 14px;
  opacity: 0.8;
}

/* Animations */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* @keyframes loading {
        from {
          max-width: 0;
        }
        to {
          max-width: 95%;
        }
      } */

.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: white;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    transition: var(--transition);
  }

  body.dark-mode .nav-links {
    background-color: var(--dark-color);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  h1 {
    font-size: 36px;
  }

  .hero-content {
    flex-direction: column;
  }

  .hero-text {
    padding-right: 0;
    margin-bottom: 40px;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .about-content {
    flex-direction: column;
  }

  .contact-container {
    flex-direction: column;
  }

  .hero-image img {
    height: 300px;
    width: 300px;
  }
}
