/* ── Dark Mode Toggle Button ── */
#dark-mode-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition:
    background 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  background: #1e293b;
  color: #f8fafc;
}

[data-theme="dark"] #dark-mode-toggle {
  background: #f1f5f9;
  color: #1e293b;
}

#dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

#dark-mode-toggle .icon-moon,
#dark-mode-toggle .icon-sun {
  position: absolute;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Light mode: show moon */
#dark-mode-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}
#dark-mode-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

/* Dark mode: show sun */
[data-theme="dark"] #dark-mode-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}
[data-theme="dark"] #dark-mode-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

/* ── Dark Mode Overrides ── */
[data-theme="dark"] body {
  background-color: #0f172a;
  color: #f1f5f9;
}

[data-theme="dark"] nav {
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .nav-links a {
  color: #cbd5e1;
}

[data-theme="dark"] .nav-links a:hover {
  color: #f1f5f9;
}

[data-theme="dark"] .bg-pattern {
  opacity: 0.04;
  filter: invert(1);
}

[data-theme="dark"] .card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
}

[data-theme="dark"] .card p {
  color: #94a3b8;
}

[data-theme="dark"] .about-section {
  background: #0f172a;
}

[data-theme="dark"] .about-box, [data-theme="dark"] .contact-form {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .about-content p {
  color: #94a3b8;
}

[data-theme="dark"] .badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

[data-theme="dark"] .badge small {
  color: #94a3b8;
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form select,
[data-theme="dark"] .contact-form textarea {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

[data-theme="dark"] .contact-form input::placeholder,
[data-theme="dark"] .contact-form textarea::placeholder {
  color: #64748b;
}

[data-theme="dark"] .contact-form select option {
  background: #1e293b;
  color: #f1f5f9;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #f1f5f9;
}

[data-theme="dark"] section {
  background-color: #0f172a;
}

[data-theme="dark"] footer {
  background: #020817;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .hero p {
  color: #94a3b8;
}

@media (max-width: 768px) {
  [data-theme="dark"] .nav-links.active {
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}
