/* Base Styles */
:root {
  --primary: #4a00e0;
  --secondary: #8e2de2;
  --dark: #121212;
  --light: #f4f4f4;
  --gray: #888;
  --card-bg: rgba(25, 25, 25, 0.8);
  --border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark);
  color: var(--light);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 100px 0;
  position: relative;
}

h1,
h2,
h3 {
  margin-bottom: 20px;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 60px;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 2px;
}

p {
  line-height: 1.6;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(74, 0, 224, 0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(74, 0, 224, 0.6);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
}

header.scrolled {
  background-color: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.logo span {
  color: var(--primary);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(142, 45, 226, 0.2), transparent 50%), radial-gradient(circle at bottom left, rgba(74, 0, 224, 0.2), transparent 50%);
  z-index: -1;
}

.hero-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-text {
  max-width: 600px;
  animation: fadeInUp 1s ease-out;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero-text h3 {
  font-size: 1.5rem;
  color: var(--gray);
  margin-bottom: 30px;
}

.hero-text p {
  margin-bottom: 40px;
}

.hero-image {
  position: relative;
  width: 400px;
  height: 400px;
  animation: float 4s ease-in-out infinite;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0px 30px white;
}

.social-icons {
  display: flex;
  margin-top: 30px;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border-radius: 50%;
  margin-right: 15px;
  transition: all 0.3s ease;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transform: translateY(-5px);
}

/* About */
.about-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
  position: relative;
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease;
}

.about-image.animated {
  opacity: 1;
  transform: translateX(0);
}

.about-image img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
}

.about-image::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  border: 4px solid var(--primary);
  border-radius: var(--border-radius);
  z-index: -1;
}

.about-text {
  flex: 1;
  opacity: 0;
  transform: translateX(50px);
  transition: all 1s ease;
}

.about-text.animated {
  opacity: 1;
  transform: translateX(0);
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

/* Skills */
.skills-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.skill-category {
  flex: 1;
  min-width: 300px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.6s ease;
}

.skill-category.animated {
  transform: translateY(0);
  opacity: 1;
}

.skill-category h3 {
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.skill-category h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 10px;
}

.skill-item {
  margin-bottom: 25px;
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.skill-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 5px;
  width: 0;
  transition: width 1.5s ease;
}

/* Certificates */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.certificate-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.6s ease;
}

.certificate-card.animated {
  transform: scale(1);
  opacity: 1;
}

.certificate-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.certificate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.certificate-card:hover .certificate-img img {
  transform: scale(1.1);
}

.certificate-info {
  padding: 20px;
}

.certificate-info h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.certificate-info p {
  color: var(--gray);
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.certificate-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.certificate-info a i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.certificate-info a:hover {
  color: var(--secondary);
}

.certificate-info a:hover i {
  transform: translateX(5px);
}

/* Certificate Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-body img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.certificate-details {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
}

.certificate-details p {
  margin: 10px 0;
}

/* Projects */
.projects-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px;
  border-radius: 30px;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  transform: translateY(50px);
  opacity: 0;
}

.project-card.animated {
  transform: translateY(0);
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.project-img {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-category {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px 15px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.project-info p {
  color: var(--gray);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.project-links {
  display: flex;
}

.project-links a {
  display: flex;
  align-items: center;
  margin-right: 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-links a i {
  margin-right: 5px;
}

.project-links a:hover {
  color: var(--primary);
}

/* Contact */
.contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.contact-info {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease;
}

.contact-info.animated {
  opacity: 1;
  transform: translateX(0);
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--card-bg);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  font-size: 1.4rem;
  color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-details h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.contact-details p,
.contact-details a {
  color: var(--gray);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-details a:hover {
  color: var(--primary);
}

.contact-form {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateX(50px);
  transition: all 1s ease;
}

.contact-form.animated {
  opacity: 1;
  transform: translateX(0);
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 10px rgba(74, 0, 224, 0.3);
}

.input-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background: rgba(25, 25, 25, 0.9);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content p {
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.footer-links a {
  color: var(--light);
  text-decoration: none;
  margin: 0 15px;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-social {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.footer-social a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border-radius: 50%;
  margin: 0 10px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transform: translateY(-5px);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Particles */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .hero-image {
    width: 350px;
    height: 350px;
  }
}

@media screen and (max-width: 768px) {
  h2 {
    font-size: 2rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text {
    margin-top: 40px;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .social-icons {
    justify-content: center;
  }

  .about-content,
  .contact-content {
    flex-direction: column;
  }

  .about-image::before {
    display: none;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .mobile-toggle {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    padding: 80px 40px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    z-index: 1001;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    margin: 0 0 20px 0;
  }

  .close-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
  }
}

@media screen and (max-width: 480px) {
  .hero-image {
    width: 280px;
    height: 280px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h3 {
    font-size: 1.2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
  }
}
