/* ================================
   SISTEMA DE TEMAS - CLARO/OSCURO
   ================================ */

/* Tema por defecto - OSCURO */
:root {
  --bg-primary: #040d21;
  --bg-secondary: #0a1628;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-secondary: #00d4ff;
}

/* Tema CLARO */
body.light-theme {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.7);
  --accent-secondary: #00a8d4;
}

/* Aplicar tema a body */
body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  transition: background-color 0.5s ease, color 0.5s ease !important;
}

html {
  background-color: var(--bg-primary) !important;
}

/* Elementos genéricos */
section, div, header, footer, main, article {
  transition: background-color 0.5s ease, color 0.5s ease !important;
}

/* Navbar */
#navbar {
  background: linear-gradient(180deg, rgba(4, 13, 33, 0.95) 0%, rgba(4, 13, 33, 0.85) 100%) !important;
  border-bottom: 2px solid rgba(0, 212, 255, 0.1) !important;
}

body.light-theme #navbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%) !important;
  border-bottom: 2px solid rgba(13, 110, 253, 0.15) !important;
}

body.light-theme #navbar .nav-link-modern {
  color: #1a1a1a !important;
}

body.light-theme #navbar .navbar-brand .brand-text .brand-name {
  color: #1a1a1a !important;
}

body.light-theme #navbar .navbar-brand .brand-text .brand-title {
  color: #666666 !important;
}

/* Cards */
.card {
  background: rgba(13, 110, 253, 0.05) !important;
  border-color: rgba(0, 212, 255, 0.1) !important;
  color: var(--text-primary) !important;
}

body.light-theme .card {
  background: #ffffff !important;
  border-color: rgba(13, 110, 253, 0.2) !important;
  color: #1a1a1a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Buttons */
.btn {
  transition: all 0.3s ease !important;
}

body.light-theme .btn-outline-primary {
  color: #0d6efd !important;
  border-color: #0d6efd !important;
}

body.light-theme .btn-outline-primary:hover {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: white !important;
}

/* Inputs */
input, textarea, select {
  background-color: #0f1e2e !important;
  color: #ffffff !important;
  border-color: rgba(0, 212, 255, 0.1) !important;
}

body.light-theme input,
body.light-theme textarea,
body.light-theme select {
  background-color: #ffffff !important;
  color: #1a1a1a !important;
  border-color: rgba(13, 110, 253, 0.2) !important;
}

/* Text elements */
.text-light-emphasis {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-secondary) !important;
}

body.light-theme p {
  color: #333333 !important;
}

body.light-theme h1, body.light-theme h2, body.light-theme h3, 
body.light-theme h4, body.light-theme h5, body.light-theme h6 {
  color: #1a1a1a !important;
}

body.light-theme .text-primary {
  color: #0d6efd !important;
}

body.light-theme .text-secondary {
  color: #666666 !important;
}

/* Hero Section */
#hero {
  background-color: var(--bg-primary) !important;
}

body.light-theme #hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%) !important;
}

/* Particles */
#particles-js {
  background: var(--bg-primary) !important;
}

body.light-theme #particles-js {
  background: #f8f9fa !important;
}

/* Chatbot */
.chatbot-window {
  background: var(--bg-secondary) !important;
}

body.light-theme .chatbot-window {
  background: #ffffff !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
}

.message.bot-message {
  background: rgba(13, 110, 253, 0.05) !important;
  color: var(--text-primary) !important;
}

body.light-theme .message.bot-message {
  background: #f0f2f5 !important;
  color: #1a1a1a !important;
}

.message.user-message {
  background: var(--accent-secondary) !important;
}

body.light-theme .message.user-message {
  background: #0d6efd !important;
  color: white !important;
}

/* Toggle Button */
.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--accent-secondary);
  background: var(--bg-secondary) !important;
  color: var(--accent-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease !important;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.light-theme .theme-toggle-btn {
  border-color: #0d6efd;
  background: #ffffff !important;
  color: #0d6efd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4) !important;
}

body.light-theme .theme-toggle-btn:hover {
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3) !important;
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Navbar Theme Button */
.theme-btn-navbar {
  border: 2px solid rgba(0, 212, 255, 0.4);
  color: #00d4ff;
  background: transparent;
  transition: all 0.3s ease;
}

body.light-theme .theme-btn-navbar {
  border-color: rgba(13, 110, 253, 0.5);
  color: #0d6efd;
}

.theme-btn-navbar:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: rotate(20deg);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

body.light-theme .theme-btn-navbar:hover {
  background: rgba(13, 110, 253, 0.1);
  box-shadow: 0 0 15px rgba(13, 110, 253, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-secondary);
  border-radius: 5px;
}

body.light-theme::-webkit-scrollbar-thumb {
  background: #0d6efd;
}


/* Navbar */
#navbar {
  background: linear-gradient(180deg, rgba(4, 13, 33, 0.95) 0%, rgba(4, 13, 33, 0.85) 100%) !important;
}

body.light-theme #navbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%) !important;
  border-bottom-color: rgba(0, 212, 255, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme #navbar .nav-link-modern {
  color: #1a1a1a !important;
}

body.light-theme #navbar::after {
  background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.3), transparent) !important;
}

body.light-theme .navbar-brand .brand-text .brand-name,
body.light-theme .navbar-brand .brand-text .brand-title {
  color: #1a1a1a !important;
}

/* Hero Section */
#hero {
  background: var(--bg-primary);
}

body.light-theme #hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
}

body.light-theme #hero h1 {
  color: var(--text-primary) !important;
}

body.light-theme #hero .lead {
  color: var(--text-secondary) !important;
}

/* Cards */
.card {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

body.light-theme .card {
  background: #ffffff !important;
  border-color: rgba(0, 212, 255, 0.15) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-outline-primary {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

body.light-theme .btn-outline-primary {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

body.light-theme .btn-outline-primary:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* Text */
.text-light-emphasis {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-tertiary) !important;
}

/* Borders */
hr {
  border-color: var(--border-color) !important;
}

/* Project Cards */
.project-card {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

body.light-theme .project-card {
  background: #ffffff !important;
  border-color: rgba(0, 212, 255, 0.15) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Tech Cards */
.tech-card {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

body.light-theme .tech-card {
  background: #ffffff !important;
  border-color: rgba(0, 212, 255, 0.15) !important;
}

/* Input Fields */
input, textarea, select {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

input::placeholder, textarea::placeholder {
  color: var(--text-tertiary) !important;
}

body.light-theme input,
body.light-theme textarea,
body.light-theme select {
  background-color: #ffffff !important;
  color: var(--text-primary) !important;
  border-color: rgba(0, 212, 255, 0.15) !important;
}

/* Chatbot */


body.light-theme .chatbot-container {
  background: #ffffff;
}

.chatbot-window {
  background: var(--bg-secondary);
}

body.light-theme .chatbot-window {
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.message.bot-message {
  background: var(--card-bg);
}

body.light-theme .message.bot-message {
  background: #f0f2f5;
}

.message.user-message {
  background: var(--accent-secondary);
}

body.light-theme .message.user-message {
  background: #00a8d4;
  color: white;
}

/* Toggle Button */
.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--accent-secondary);
  background: var(--bg-secondary);
  color: var(--accent-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  z-index: 998;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Sections */
section {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Scroll */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-secondary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

body.light-theme::-webkit-scrollbar-track {
  background: #f8f9fa;
}

/* Particles */
#particles-js {
  background: var(--bg-primary);
}

body.light-theme #particles-js {
  background: #f8f9fa;
}

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

/* Educación y Certificaciones - Tema Claro */
body.light-theme .education-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-color: rgba(13, 110, 253, 0.3);
  color: #1a1a1a;
}

body.light-theme .education-card:hover {
  box-shadow: 0 15px 35px rgba(13, 110, 253, 0.15);
  border-color: #0d6efd;
}

body.light-theme .education-title,
body.light-theme .education-institution,
body.light-theme .education-period {
  color: #1a1a1a !important;
}

body.light-theme .education-institution {
  color: #666666 !important;
}

body.light-theme .education-period {
  color: #888888 !important;
}

body.light-theme .education-description {
  color: #333333 !important;
}

body.light-theme .skill-tag {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd !important;
  border-color: rgba(13, 110, 253, 0.3);
}

body.light-theme .education-card:hover .skill-tag {
  background: rgba(13, 110, 253, 0.15);
  border-color: #0d6efd;
}

/* Status badge */
body.light-theme .status-badge {
  color: white !important;
  font-weight: 600;
}

body.light-theme .status-badge.completed {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
}

body.light-theme .status-badge.in-progress {
  background: linear-gradient(135deg, #ffc107, #ff9800);
}

/* Formal Education */
body.light-theme .formal-education {
  border: 2px solid rgba(13, 110, 253, 0.3);
  background: linear-gradient(135deg, #f0f7ff 0%, #f8f9fa 100%);
}

/* Plataformas y Herramientas - Tema Claro */
body.light-theme .platform-badge {
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.3);
}

body.light-theme .platform-badge:hover {
  background: rgba(13, 110, 253, 0.15);
  border-color: rgba(13, 110, 253, 0.5);
}

body.light-theme .platform-badge span {
  color: #1a1a1a !important;
}
