/* Theme CSS Variables */
:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e7eb;
}

/* Dark theme */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --text-primary: #fafafa;
  --text-secondary: #a1a1a1;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #262626;
}

/* Smooth transitions for theme changes */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Theme Toggle Button Styles */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--border);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }
}

/* External link badges */
.external-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

/* Blog post external link indicators */
article a[target="_blank"] svg {
  flex-shrink: 0;
}
