/* General Styles */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #121212;
  color: #ffffff;
  line-height: 1.6;
}

/* Loading Animation */
.loading-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #121212;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loader {
  border: 5px solid #00ffcc;
  border-top: 5px solid transparent;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header Section */
header {
  background-color: #1f1f1f;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #00ffcc;
}

.menu-icon {
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
}

.menu-icon div {
  width: 30px;
  height: 3px;
  background-color: #ffffff;
}

.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  right: 0;
  background-color: #1f1f1f;
  width: 200px;
  padding: 1rem;
  border-radius: 10px;
}

/* Responsive Header */
@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: linear-gradient(135deg, #00ffcc, #0066ff);
  color: #121212;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero .btn {
  padding: 0.8rem 1.5rem;
  background-color: #121212;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.hero .btn:hover {
  background-color: #00ffcc;
}

.download-resume {
  background-color: #0066ff;
}

.download-resume:hover {
  background-color: #0044cc;
}

/* Responsive Hero Section */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }
}

/* About Section */
.about {
  padding: 4rem 1rem;
  text-align: center;
  background-color: #121212;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #00ffcc;
}

.about-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
}

.about-image img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid #00ffcc;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.1);
}

.about-text {
  max-width: 600px;
}

.about-text p {
  font-size: 1.2rem;
  line-height: 1.8;
}

.highlight {
  color: #00ffcc;
  font-weight: bold;
}

.badges {
  margin-top: 1rem;
}

.badge {
  display: inline-block;
  background-color: #1f1f1f;
  color: #00ffcc;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin: 0.3rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.badge:hover {
  background-color: #0066ff;
  color: #ffffff;
  transform: translateY(-3px);
}

/* Responsive About Section */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-image img {
    width: 120px;
    height: 120px;
  }

  .about-text p {
    font-size: 1rem;
  }

  .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Skills Section */
.skills {
  padding: 4rem 1rem;
  background-color: #121212;
}

.skills h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  color: #00ffcc;
}

.skill-container {
  max-width: 800px;
  margin: 0 auto;
}

.skill {
  margin-bottom: 1.5rem;
}

.skill p {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-bar {
  background-color: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  height: 20px;
}

.skill-bar .progress {
  height: 100%;
  background-color: #00ffcc;
  width: 0;
  transition: width 1s ease-in-out;
}

/* Responsive Skills Section */
@media (max-width: 480px) {
  .skills h2 {
    font-size: 2rem;
  }

  .skill p {
    font-size: 0.9rem;
  }
}

/* Projects Section */
.projects {
  padding: 4rem 1rem;
  background-color: #1f1f1f;
}

.projects h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  color: #00ffcc;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: #2a2a2a;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #00ffcc;
}

.project-card p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.project-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.project-card .btn {
  padding: 0.8rem 1.5rem;
  background-color: #00ffcc;
  color: #121212;
  text-decoration: none;
  font-weight: 600;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.project-card .btn:hover {
  background-color: #0066ff;
  color: #ffffff;
}

.view-code {
  background-color: #0066ff;
}

.view-code:hover {
  background-color: #0044cc;
}

/* Responsive Projects Section */
@media (max-width: 480px) {
  .projects h2 {
    font-size: 2rem;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .project-card h3 {
    font-size: 1.2rem;
  }

  .project-card p {
    font-size: 0.9rem;
  }

  .project-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Contact Section */
.contact {
  padding: 4rem 1rem;
  text-align: center;
  background-color: #1f1f1f;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #00ffcc;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.contact-form input, .contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.contact-form button {
  padding: 0.8rem;
  background-color: #00ffcc;
  color: #121212;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

.contact-form button:hover {
  background-color: #0066ff;
  color: #ffffff;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  margin: 0.5rem 0;
  display: inline-block;
  color: #00ffcc;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
}

.social-links a:hover {
  color: #0066ff;
}

/* Responsive Contact Section */
@media (max-width: 480px) {
  .contact h2 {
    font-size: 2rem;
  }

  .contact-form input, .contact-form textarea {
    font-size: 0.9rem;
  }

  .contact-form button {
    font-size: 0.9rem;
  }
}

/* Footer Section */
.footer {
  background-color: #121212;
  color: #ffffff;
  text-align: center;
  padding: 1rem 0;
  font-size: 1rem;
  border-top: 1px solid #333;
}

.footer p {
  margin: 0;
  color: #00ffcc;
  font-family: 'Poppins', sans-serif;
}

/* Dark Mode Styles */
body.light-mode {
  background-color: #ffffff;
  color: #121212;
}

header.light-mode {
  background-color: #f0f0f0;
}

.light-mode .nav-links li a {
  color: #121212;
}

.light-mode .theme-toggle {
  color: #121212;
}

.light-mode .about,
.light-mode .skills,
.light-mode .projects,
.light-mode .contact,
.light-mode .footer {
  background-color: #f0f0f0;
  color: #121212;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  background-color: #00ffcc;
  color: #121212;
  text-align: center;
  font-weight: bold;
}

/* Before/After Slider */
.before-after {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.before, .after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
}

.after {
  width: 50%;
}

.slider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.parallax {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('path-to-your-image.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
}

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 4rem 1rem;
  color: #121212;
}

.project-card {
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.project-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
}

.card-front {
  background-color: #2a2a2a;
}

.card-back {
  background-color: #00ffcc;
  color: #121212;
  transform: rotateY(180deg);
}

.hero {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.nav-links li a.active {
  color: #00ffcc;
  border-bottom: 2px solid #00ffcc;
}

/* Base styles for the project card */
.project-card {
  perspective: 1000px;
  width: 100%; /* Full width on smaller screens */
  max-width: 300px; /* Limit width on larger screens */
  margin: 0 auto; /* Center the card */
  height: 400px; /* Fixed height for consistency */
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.project-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-front {
  background-color: #2a2a2a;
  color: #ffffff;
}

.card-back {
  background-color: #00ffcc;
  color: #121212;
  transform: rotateY(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-card {
    max-width: 250px; /* Smaller cards on tablets */
    height: 350px; /* Adjust height for smaller screens */
  }

  .card-front h3 {
    font-size: 1.2rem; /* Smaller font size for headings */
  }

  .card-front p,
  .card-back p {
    font-size: 0.9rem; /* Smaller font size for text */
  }

  .project-buttons {
    flex-direction: column; /* Stack buttons vertically on small screens */
    gap: 0.5rem;
  }

  .project-buttons .btn {
    padding: 0.6rem 1rem; /* Smaller buttons */
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .project-card {
    max-width: 100%; /* Full width on mobile */
    height: 300px; /* Adjust height for mobile */
  }

  .card-front h3 {
    font-size: 1rem; /* Even smaller font size for mobile */
  }

  .card-front p,
  .card-back p {
    font-size: 0.8rem; /* Smaller font size for mobile */
  }

  .project-buttons .btn {
    padding: 0.5rem 0.8rem; /* Smaller buttons for mobile */
    font-size: 0.8rem;
  }
}

/* Add this to handle the flipped state */
.card-inner.flipped {
  transform: rotateY(180deg);
}

#typewriter::after {
  content: "|";
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.skill-percentage {
  float: right;
  color: #00ffcc;
  font-weight: bold;
}

.skill-bar .progress:hover::after {
  content: attr(data-percentage) "%";
  position: absolute;
  right: 10px;
  top: -25px;
  background-color: #00ffcc;
  color: #121212;
  padding: 5px;
  border-radius: 5px;
  font-size: 0.9rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #00ffcc;
  z-index: 9999;
  transition: width 0.3s ease;
}

.contact-form .error {
  border: 2px solid #ff4444;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Updated Menu Icon Styles */
.menu-icon {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 1000;
}

.menu-icon div {
  width: 30px;
  height: 3px;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.menu-icon.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.active div:nth-child(2) {
  opacity: 0;
}

.menu-icon.active div:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -8px);
}

@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background-color: #1f1f1f;
    flex-direction: column;
    padding-top: 80px;
    transition: right 0.3s ease;
  }

  .nav-links.open {
    right: 0;
  }
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #00ffcc;
  color: #121212;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: #0066ff;
  color: #ffffff;
}

/* Form Message Styles */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 5px;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  display: block;
}

