* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --background-dark: #121212;
  --background-light: #f5f5f5;
  --text-dark: #ffffff;
  --text-light: #121212;
  --card-dark: #1f1f1f;
  --card-light: #ffffff;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --background: var(--background-dark);
  --text: var(--text-dark);
  --card: var(--card-dark);
}

[data-theme="light"] {
  --background: var(--background-light);
  --text: var(--text-light);
  --card: var(--card-light);
}

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

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: var(--transition);
}

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

.nav-links button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text);
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('assets/hero-bg.jpg') no-repeat center/cover;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  animation: fadeIn 1s ease-in;
}

.hero img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--primary-color);
  object-fit: cover;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

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

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
}

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

/* Projects Section */
#projects {
  padding: 4rem 2rem;
  background: var(--background);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project {
  background: var(--card);
  padding: 2rem;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.project h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

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

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

/* Skills Section */
#skills {
  padding: 4rem 2rem;
  background: var(--background);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
}

.skill-card {
  background: var(--card);
  padding: 1.5rem;
  text-align: center;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.skill-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.progress-bar {
  background: #333;
  border-radius: 20px;
  overflow: hidden;
  height: 10px;
  margin-top: 0.5rem;
}

.progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 20px;
  transition: width 0.6s ease-in-out;
}

/* Contact Section */
#contact {
  padding: 4rem 2rem;
  background: var(--background);
}

.contact-form {
  background: var(--card);
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 5px;
  border: 1px solid var(--secondary-color);
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
}

.contact-form button {
  background: var(--primary-color);
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form button:hover {
  background: var(--secondary-color);
}

.form-message {
  margin-top: 1rem;
  color: var(--primary-color);
  display: none;
}

/* Footer */
footer {
  text-align: center;
  background: var(--card);
  padding: 2rem;
  box-shadow: var(--shadow);
}

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

.social-links a {
  color: var(--text);
  font-size: 2rem;
  margin: 0 1rem;
  transition: var(--transition);
}

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.back-to-top:hover {
  background: var(--secondary-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
      padding: 1rem;
  }

  .nav-links {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 70px;
      left: 0;
      width: 100%;
      background: var(--card);
      padding: 1rem;
      box-shadow: var(--shadow);
  }

  .nav-links.active {
      display: flex;
  }

  .nav-links a,
  .nav-links button {
      padding: 1rem;
      font-size: 1.2rem;
      text-align: center;
  }

  .menu-toggle {
      display: flex;
  }

  .hero h2 {
      font-size: 2rem;
  }

  .hero p {
      font-size: 1rem;
  }

  .projects {
      grid-template-columns: 1fr;
  }

  .skills-grid {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero img {
      width: 120px;
      height: 120px;
  }

  .cta-button {
      padding: 0.8rem 1.5rem;
  }

  .contact-form {
      padding: 1.5rem;
  }
}