* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary-color: #2ecc71;
  --secondary-color: #27ae60;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  color: var(--dark-color);
  transition: background-color 0.5s ease, color 0.5s ease;
}

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

/* Navigation */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

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

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

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

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

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("harish.jpg"); /*hero-bg.jpg*/
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero-content {
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

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

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

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

/* Add to your existing CSS */

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cv {
  background-color: var(--dark-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cv:hover {
  background-color: #1a252f;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Add these animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero h1 {
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
}

.hero p {
  animation: fadeIn 1s ease-out forwards 0.5s;
  opacity: 0;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out forwards 0.8s;
  opacity: 0;
}

/* Add hover effect to text */
.hero h1 span {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.hero h1 span:hover {
  color: var(--secondary-color);
}

.hero h1 span::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.hero h1 span:hover::after {
  transform: scaleX(1);
}

/* Button hover animation */
.btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
}

/* About Section */
.about {
  padding: 5rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

.about-text p {
  margin-bottom: 70px; /* Adds space between text and skills */
}

.about-image img {
  width: 100%;
  border-radius: 10px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin-top: 1rem;
}

.skills li {
  background-color: var(--light-color);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;

  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}

.skills li:nth-child(1) {
  animation-delay: 0.2s;
}
.skills li:nth-child(2) {
  animation-delay: 0.4s;
}
.skills li:nth-child(3) {
  animation-delay: 0.6s;
}
.skills li:nth-child(4) {
  animation-delay: 0.8s;
}
.skills li:nth-child(5) {
  animation-delay: 1s;
}
.skills li:nth-child(6) {
  animation-delay: 1.2s;
}

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

.skills li:hover {
  background-color: var(--secondary-color);
  color: var(--light-color);
  transition: all 0.3s ease;
}

/* i is for icon */
.skills li i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.skills li:hover i {
  /* transform: rotate(20deg); */

  transform: scale(1.2);
  color: #1a252f;
  transition: transform 0.3s ease;
}

/* Projects Section */
.projects {
  background-color: var(--light-color);
  padding: 5rem 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background-color: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card img {
  transition: all 0.3s ease;
}

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

/* Initially hide the project cards and position them to the left */
.project-card {
  opacity: 0;
  transform: translateX(-100px);
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

/* When a project card is in view, make it slide in */
.project-card.show {
  opacity: 1;
  transform: translateX(0);
}
.project-link:nth-child(1) .project-card {
  transition-delay: 0.2s;
}
.project-link:nth-child(2) .project-card {
  transition-delay: 0.4s;
}
.project-link:nth-child(3) .project-card {
  transition-delay: 0.6s;
}

/* Optional: Add an overlay effect */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(46, 204, 113, 0.3));
  z-index: 1;
  opacity: 0;
  transition: all 0.3s ease;
}

.project-card:hover::before {
  opacity: 1;
}

/* Add this if you want to animate the text */
.project-card h3,
.project-card p {
  transition: all 0.3s ease;
}

.project-card:hover h3 {
  color: var(--primary-color);
}

.project-card:hover p {
  opacity: 0.9;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
}

form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

input,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: #fff;
  text-align: center;
  padding: 2rem 0;
}

.social-links {
  margin-bottom: 1rem;
}

.social-links a {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 1rem;
  transition: color 0.3s;
}

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

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Dark Mode Styles */
body.dark-mode {
  --primary-color: #2ecc71;
  --secondary-color: #27ae60;
  --dark-color: #ecf0f1; /* Light text */
  --light-color: #2c3e50; /* Dark background */
  background-color: #1a252f;
  color: var(--dark-color);
}

.dark-mode .navbar {
  background-color: #1a252f;
  box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
}

.dark-mode .project-card {
  background-color: #2c3e50;
  box-shadow: 0px 3px 10px rgb(255, 253, 253);
}

.dark-mode .btn {
  background-color: var(--primary-color);
  color: var(--dark-color);
}

.dark-mode .btn:hover {
  background-color: var(--secondary-color);
}

/* Toggle Button Styles */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--dark-color);
  transition: color 0.3s ease;
}

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

.theme-toggle:hover {
  color: var(--primary-color);
}

.dark-mode footer {
  background: #2ecc71;
}

.dark-mode .social-links a:hover {
  color: var(--light-color);
}

.dark-mode .skills li:hover i {
  color: white;
}

/* anchor tags */
a {
  text-decoration: none;
  color: inherit;
}
