/* =========================
   GLOBAL RESET
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: #f7f9fc;
  color: #333;
  line-height: 1.6;
  padding: 20px 10px;
}

/* =========================
   CONTAINER
   ========================= */
.container {
  max-width: 1000px;
  margin: 20px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

/* =========================
   NAVBAR
   ========================= */
.navbar {
  position: sticky;
  top: 0;
  background: #007bff;
  padding: 14px 0;
  text-align: center;
  z-index: 100;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  margin: 0 16px;
}

.navbar a:hover {
  text-decoration: underline;
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: white;
  padding: 6px 10px;
  border-radius: 14px;
  cursor: pointer;
  margin-left: 10px;
}

/* =========================
   HEADER
   ========================= */
.site-header {
  text-align: center;
  padding: 35px 20px;
  background: linear-gradient(135deg, #4da9ff, #6cb2eb);
  color: white;
  border-radius: 16px;
}

.site-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.site-header .tagline {
  font-size: 1rem;
  opacity: 0.95;
}

.profile-img {
  margin: 12px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
}

/* =========================
   SECTIONS
   ========================= */
section {
  margin-top: 28px;
  padding: 22px;
  background: #f8f9fc;
  border-radius: 12px;
}

section h2 {
  color: #003366;
  margin-bottom: 12px;
  border-bottom: 2px solid #007bff;
  display: inline-block;
  padding-bottom: 4px;
}

section p {
  margin-top: 10px;
}

/* =========================
   SKILLS LIST
   ========================= */
.skills-list {
  list-style: square;
  padding-left: 22px;
  margin-top: 10px;
}

.skills-list li {
  margin: 6px 0;
}

/* =========================
   PROJECTS
   ========================= */
.project {
  margin-top: 18px;
}

.project h3 {
  color: #003366;
  margin-bottom: 6px;
}

.project a {
  display: inline-block;
  margin-top: 6px;
  color: #007bff;
  font-weight: 600;
}

/* =========================
   RESUME BUTTON
   ========================= */
.btn-resume {
  display: inline-block;
  margin-top: 14px;
  background: #007bff;
  color: white;
  padding: 10px 22px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
}

.btn-resume:hover {
  background: #005fcc;
}

/* =========================
   CONTACT
   ========================= */
.contact-footer {
  margin-top: 36px;
  background: #007bff;
  color: white;
  text-align: center;
  padding: 32px 20px;
  border-radius: 12px;
}

.contact-links a {
  color: #ffe082;
  margin: 0 10px;
  text-decoration: none;
  font-weight: 600;
}

.contact-links a:hover {
  color: white;
}

.contact-footer .copyright {
  margin-top: 12px;
  font-size: 0.9rem;
}

/* ===============================
   BACK TO TOP (FINAL)
================================ */

#backToTop {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;

  z-index: 9999;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================
   DARK MODE
   ========================= */
[data-theme="dark"] body {
  background: #0d1117;
  color: #f0f6fc;
}

[data-theme="dark"] .container,
[data-theme="dark"] section {
  background: #161b22;
}

[data-theme="dark"] .navbar {
  background: #003366;
}

[data-theme="dark"] a {
  color: #58a6ff;
}

[data-theme="dark"] .contact-footer {
  background: #003366;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 720px) {
  .container {
    padding: 20px;
  }

  .navbar a {
    margin: 0 10px;
  }

  .profile-img {
    width: 110px;
    height: 110px;
  }
}