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

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  text-align: center;
  padding: 40px;
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

header p {
  color: #666;
  font-size: 1.2rem;
}

/* Navigation */
nav ul {
  list-style: none;
  margin-top: 15px;
}

nav ul li {
  display: inline;
  margin: 0 15px;
}

nav ul li a {
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #0056b3;
}

/* Sections */
section {
  max-width: 900px;
  margin: 50px auto;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

section:hover {
  transform: translateY(-5px);
}

h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
}

/* Projects */
.project {
  background: #f1f1f1;
  padding: 20px;
  margin-top: 15px;
  border-left: 5px solid #007bff;
  border-radius: 5px;
  transition: background 0.3s;
}

.project:hover {
  background: #e0e7ff;
}

/* Skills */
ul {
  list-style: none;
  text-align: center;
}

ul li {
  display: inline-block;
  background: #e3e6ea;
  padding: 8px 15px;
  margin: 5px;
  border-radius: 20px;
  font-size: 1rem;
}

/* Contact Form */
form {
  display: flex;
  flex-direction: column;
}

label {
  margin-top: 10px;
  font-weight: bold;
}

input,
textarea {
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
}

button {
  margin-top: 15px;
  padding: 10px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1.2rem;
}

button:hover {
  background: #0056b3;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  background: #f1f1f1;
}

/* Dark Mode Toggle */
.switch {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 30px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background: #ccc;
  border-radius: 30px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: black;
  transition: background 0.3s, color 0.3s;
}

input:checked + .slider {
  background: #4a90e2;
  color: white;
}
.slider::after {
  content: "Light"; /* Default mode */
}

input:checked + .slider::after {
  content: "Dark"; /* When toggled */
}

/* Dark Mode */
.dark-mode {
  background-color: #121212;
  color: #f8f9fa;
}

.dark-mode header,
.dark-mode section,
.dark-mode .project {
  background: #1e1e1e;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode p,
.dark-mode li,
.dark-mode a {
  color: #f8f9fa;
}

.dark-mode ul li {
  background: #333;
  color: #fff;
}

.dark-mode button {
  background: #4a90e2;
  color: #fff;
}

.dark-mode button:hover {
  background: #357abd;
}

.dark-mode .project {
  background: #292929;
  border-left: 5px solid #4a90e2;
}

/* Mode Text */
#modeText {
  position: fixed;
  top: 23px;
  right: 80px;
  font-size: 16px;
  color: #333;
  transition: color 0.3s;
}

.dark-mode #modeText {
  color: #f8f9fa;
}

/* Keyframe Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.switch {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 30px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background: #ccc;
  border-radius: 30px;
  width: 100%;
  height: 100%;
  transition: background 0.3s;

  display: flex;
  align-items: center;
  justify-content: center; /* Center text */
  font-size: 12px;
  font-weight: bold;
  color: black;
}

input:checked + .slider {
  background: #4a90e2;
  color: white;
}
