/* 🌐 Base Styles */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 20px;
  background: linear-gradient(to right, #f0f8ff, #e0f7fa);
  color: #333;
  transition: background 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
}

/* ✅ Scroll Progress Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: #007BFF;
  z-index: 10001;
  transition: width 0.2s ease;
}

/* 🧱 Sticky Header */
header {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

header h1 {
  font-size: 20px;
  color: #007BFF;
}

#darkToggle {
  font-size: 18px;
  background-color: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

/* 💎 Main Container */
.container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* 👤 Profile Pic */
.profile-pic {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #007BFF;
  display: block;
  margin: auto;
}

h1, h2 {
  text-align: center;
  color: #007BFF;
}

.subtitle {
  text-align: center;
  font-size: 18px;
  margin-bottom: 20px;
}

/* 📚 Sections */
section {
  margin-bottom: 40px;
}

/* ✨ Section Animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-up-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 🧩 Skills Tags */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skills span {
  background-color: #e0f0ff;
  color: #007BFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
}

/* 🧾 Project Cards */
.project-card {
  background-color: #f8f8f8;
  border-left: 4px solid #007BFF;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: scale(1.02) rotate(-0.3deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

/* 📩 Form */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

input, textarea {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button[type="submit"],
.button {
  background-color: #007BFF;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-align: center;
}

button[type="submit"]:hover,
.button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

/* 🦶 Footer */
footer {
  margin-top: 40px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

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

.dark-mode .container {
  background: #1e1e1e;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.dark-mode a {
  color: #90caf9;
}

.dark-mode .button {
  background-color: #555;
}

.dark-mode input,
.dark-mode textarea {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #444;
}

/* 🎯 Scroll To Top */
#scrollTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #007BFF;
  color: white;
  border: none;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 999;
}

#scrollTopBtn:hover {
  background-color: #0056b3;
}

/* ✨ Preloader */
#preloader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  width: 40px;
  height: 40px;
  border: 4px solid #007BFF;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 💫 Fade-in Animation */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

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

/* 📱 Responsive */
@media screen and (max-width: 600px) {
  .container {
    padding: 20px;
  }

  .profile-pic {
    width: 100px;
    height: 100px;
  }

  h1 {
    font-size: 22px;
  }

  .subtitle {
    font-size: 14px;
  }

  .skills span {
    font-size: 13px;
  }
}

/* 🧑‍💼 Hire Me & 🎓 Teaching sections */
section#hire,
section#teach {
  background: #f9fbff;
  padding: 30px;
  margin-top: 50px;
  border-radius: 14px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  transition: 0.3s ease-in-out;
}

section#hire:hover,
section#teach:hover {
  transform: translateY(-3px);
}

section#hire h2::before {
  content: "🧑‍💼 ";
}

section#teach h2::before {
  content: "🎓 ";
}

section#hire h2,
section#teach h2 {
  color: #0056b3;
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
}

/* 💼 Form styling shared */
section#hire form,
section#teach form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

section#hire form textarea,
section#teach form textarea {
  grid-column: span 2;
}

section#hire form button,
section#teach form button {
  grid-column: span 2;
  background: linear-gradient(to right, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s ease;
}

section#hire form button:hover,
section#teach form button:hover {
  background: linear-gradient(to right, #0056b3, #0041a8);
}

/* 📱 Responsive for mobile */
@media screen and (max-width: 600px) {
  section#hire form,
  section#teach form {
    grid-template-columns: 1fr;
  }

  section#hire form button,
  section#teach form button {
    grid-column: span 1;
  }
}