/********** Template CSS **********/
:root {
  --primary: #2f6fed;   /* Azul confianza */
  --secondary: #0B1B34; /* Marino profundo */
  --light: #F5F7FB;     /* Fondo claro */
  --dark: #0F172A;      /* Texto/fondo oscuro base en claro */
  --light2: #fecf7f;

  /* Estados consistentes */
  --success: #2F6FED; /* Éxito */
  --warning: #fcc668; /* CTA / Advertencia */
  --info:    #0EA5E9; /* Informativo */
  --danger:  #EF4444; /* Error */
}

/* Dark Mode Variables */
body.dark-mode {
  /* Variables en modo oscuro */
  --primary: #2F6FED;
  --secondary: #0A1022; /* Más profundo para UI */
  --light: #0D1325;     /* Paneles oscuros */
  --dark: #E8EEF9;      /* Texto claro en oscuro */
  --light2: #fecf7f;

  background-color: #0B1020; /* Fondo principal oscuro */
  color: #E8EEF9;            /* Texto principal */
}

/* Dark Mode Toggle Button */
.btn-dark-mode {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  background-color: var(--info);
  border-color: var(--light);
}

.btn-dark-mode:hover {
  transform: scale(1.1);
}

body.dark-mode .btn-dark-mode {
  background-color: var(--light2);
  border-color: var(--light2);
  color: var(--secondary);
}

/* Spinner */
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/* Responsive */
@media (max-width: 991.98px) {
  .sticky-lg-top.vh-100 {
    height: 100% !important;
  }
}

/* Typography */
.fw-semi-bold {
  font-weight: 600;
}

.fw-medium {
  font-weight: 500;
}

/* Professional Tagline */
.professional-tagline {
  color: #a8b2c1;
  font-style: italic;
  font-size: 0.95rem;
}

/* Availability Status - AUMENTADA SEPARACIÓN */
.availability-status {
  margin-top: 20px !important; /* Añadido más margen superior */
  margin-bottom: 15px !important;
}

.availability-status .badge {
  animation: pulse 2s infinite;
  background-color: var(--info);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(166, 217, 241, 0.534);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* Buttons */
.btn-square {
  width: 40px;
  height: 40px;
}

.btn-sm-square {
  width: 30px;
  height: 30px;
}

.btn-lg-square {
  width: 50px;
  height: 50px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-square:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 184, 123, 0.3);
}

.btn .btn-primary {
  color: #FFFFFF;
}

/* Typed Cursor */
.typed-cursor {
  font-size: 25px;
  color: var(--primary);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Back to Top */
.back-to-top {
  position: fixed;
  display: none;
  width: 45px;
  height: 45px;
  text-align: center;
  line-height: 45px;
  font-size: 20px;
  right: 30px;
  bottom: 30px;
  background: var(--primary);
  border-radius: 50%;
  transition: all 0.3s;
  z-index: 11;
  box-shadow: 0 2px 10px rgba(0, 184, 123, 0.3);
}

.back-to-top i {
  color: #FFFFFF;
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 184, 123, 0.4);
}

/* Animation */
@keyframes action {
  0% { transform: translateY(0); }
  100% { transform: translateY(-15px); }
}

/* Titles */
.title {
  position: relative;
  color: var(--primary);
  font-weight: 700;
}

.title::after {
  position: absolute;
  content: "";
  width: 80px;
  height: 3px;
  bottom: -10px;
  left: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
}

.name {
  background: linear-gradient(45deg, #FFE8B0, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* Profile Picture - IMAGEN CIRCULAR Y ESTÁTICA */
.mypic {
  bottom: 0;
  border-radius: 50%; /* Hace la imagen circular */
  object-fit: cover; /* Mantiene las proporciones */
  width: 50%;
  /* Removido transform transition para hacer la imagen estática */
}

/* About Section */
.about-text {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.8;
}

.highlight-list {
  list-style: none;
  padding-left: 0;
}

.highlight-list li {
  padding: 5px 0;
  transition: transform 0.3s;
}

.highlight-list li:hover {
  transform: translateX(5px);
}

.highlight-list li i {
  color: var(--info);
}

.key-highlights {
  background: rgba(0, 184, 123, 0.05);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
}

/* Skills Section */
.skills-category {
  background: #FFFFFF;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  height: 100%;
}

.skills-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.skills-category h5 {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 20px;
}

.skills-category .badge-bg {
  color: #E8EEF9 !important;
  background-color: var(--info);
}

/* Dark Mode - Skills Section H5 FIX */
body.dark-mode .skills-category h5 {
  color: #E8EEF9 !important; /* Color más claro en dark mode */
}

body.dark-mode .skills-category span {
  color: #E8EEF9 !important; /* Color más claro en dark mode */
}

body.dark-mode .skills-category .badge-bg {
  color: #E8EEF9 !important; /* Color más claro en dark mode */
  background-color: var(--info);
}

body.dark-mode .skills-category h5 i {
  color: var(--primary) !important; /* Ícono en color primario */
}
/*--------------*/

.skill-item {
  margin-bottom: 15px;
  color:var(--secondary);
}

.progress {
  height: 8px;
  border-radius: 5px;
  background: #E3E8F2;
}

.progress-bar {
  border-radius: 5px;
  transition: width 2s ease-in-out;
}

/* Frontend Development Badges - COLOR MÁS OSCURO */
.skill-icons .badge.bg-secondary {
  background-color: #0F172A !important; /* Gris mucho más oscuro */
  color: #ffffff !important;
  font-size: 0.9rem;
  padding: 8px 12px;
  margin: 5px;
  transition: all 0.3s;
}

.skill-icons .badge:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Timeline for Experience */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

/* Timeline Marker - MOVIDO UN POCO A LA DERECHA */
.timeline-marker {
  position: absolute;
  left: -20px; /* Cambiado de -25px a -20px */
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 184, 123, 0.2);
}

.timeline-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 184, 123, 0.1);
}

.timeline-header h5 {
  color: #0EA5E9;
  font-weight: 600;
}

.timeline-achievements {
  list-style: none;
  padding-left: 0;
}

.timeline-achievements li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.timeline-achievements li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/*---- Botón connect----*/

.btn-connect {
    color: var(--light);
    background-color: var(--info);
    border-color: var(--primary);
}

.btn-connect:hover {
    color: var(--light);
    background-color: var(--info);
    border-color: var(--primary);
}

/*-------------------------*/

/* Tech Stack Badges - TEXTO BLANCO Y HOVER MEJORADO */
.tech-stack .badge {
  font-size: 0.85rem;
  padding: 5px 10px;
  margin: 3px;
  background: var(--light2);
  color: #2C3E50 !important; /* Texto blanco */
  border: 1px solid var(--warning);
  transition: all 0.3s;
}

.tech-stack .badge:hover {
  background: #ffc107 !important; /* Background amarillo en hover */
  color: #2C3E50 !important; /* Texto oscuro en hover */
  transform: scale(1.05);
  border-color: #ffc107;
}

/* Education Cards */
.education-card {
  background: #FFFFFF;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s;
  position: relative;
  height: 100%;
}

.education-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.education-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(0, 184, 123, 0.05) 0%, transparent 100%);
}

.education-card .ribbon {
  position: absolute;
  top: 10px;
  right: -5px;
  background: linear-gradient(45deg, #F97316, #F59E0B);
  color: #FFFFFF;
  padding: 5px 15px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.education-icon {
  margin-bottom: 20px;
  color: var(--primary);
}

/* Academic Degrees - TÍTULOS MÁS OSCUROS */
.education-card h5 {
  color: var(--primary); /* Color más oscuro para mejor legibilidad */
  font-weight: 600;
}

.institution {
  color: var(--light);
  font-size: 0.9rem;
}

body.dark-mode .institution {
  color: var(--dark);
  font-size: 0.9rem;
}

.year {
  color: var(--light);
  font-size: 0.85rem;
}

body.dark-mode .year {
  color: var(--dark);
  font-size: 0.85rem;
}

.institution2 {
  color: var(--secondary);
  font-size: 0.9rem;
}

body.dark-mode .institution2 {
  color: var(--dark);
  font-size: 0.9rem;
}

.year2 {
  color: var(--secondary);
  font-size: 0.85rem;
}

body.dark-mode .year2 {
  color: var(--dark);
  font-size: 0.85rem;
}

.key-topics .badge {
  font-size: 0.75rem;
  padding: 5px 8px;
}

/* Certification Categories */
.certification-category {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 100%;
  transition: all 0.3s;
}

.certification-category:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
}

.category-title {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.certification-list {
  list-style: none;
  padding-left: 0;
}

.certification-list li {
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.certification-list li:hover {
  padding-left: 10px;
  color: var(--primary);
}

.badge-degree{
  background-color: var(--light2);
}

/* Certification Platforms - FONDO GRIS Y LOGOS EN COLOR */
.certification-platforms-section {
  background: #F5F7FB; /* Fondo gris claro */
  padding: 30px 20px;
  border-radius: 10px;
  margin-top: 30px;
}

.learning-platforms{
  color: var(--dark);
}

body.dark-mode .learning-platforms{
  color: #2C3E50;
}

.platform-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.platform-logo {
  height: 60px; /* Aumentado de 40px a 50px */
  /* Removido filter: grayscale(100%); para mostrar en colores */
  transition: all 0.3s;
  opacity: 0.9;
}

.platform-logo:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Digital Badge Section - NUEVA SECCIÓN */
.digital-badge-section {
  /*background: #F5F7FB;*/
  padding: 30px 20px;
  /*border-radius: 10px;*/
  margin-top: 30px;
}

.digital-badge-section h5 {
  color: #f2f2f2;
  font-weight: 600;
  margin-bottom: 20px;
}

.digital-badge-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.digital-badge-item {
  text-align: center;
  transition: all 0.3s;
}

.digital-badge-item img {
  height: 120px;
  width: auto;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.digital-badge-item:hover img {
  transform: scale(1.1);
}

.digital-badge-item h6 {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 5px;
}

.digital-badge-item p {
  color: #64748B;
  font-size: 0.9rem;
  margin: 0;
}

.badge-skills span {
  color: var(--secondary);
  border-color: var(--warning);
  background-color: var(--light2);
}

/* Portfolio Section */
.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.portfolio-img {
  position: relative;
  overflow: hidden;
}

.portfolio-img img {
  transition: transform 0.3s;
}

.portfolio-card:hover .portfolio-img img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-info {
  text-align: center;
  color: #FFFFFF;
  padding: 20px;
}

.portfolio-info h4 {
  color: #FFFFFF;
  margin-bottom: 10px;
}

.portfolio-info p {
  color: #CBD5E1;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.portfolio-links .btn {
  margin: 5px;
}

/* Portfolio Stats */
.portfolio-stats {
  background: rgba(0, 184, 123, 0.05);
  padding: 40px 20px;
  border-radius: 15px;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.stat-item p {
  color: #64748B;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.counter {
  display: inline-block;
}

/* Languages Section */
.language-item {
  margin-bottom: 20px;
}

.language-item img {
  height: 16px;
  margin-right: 8px;
}

.soft-skills .badge {
  font-size: 0.8rem;
  padding: 8px 15px;
  margin: 5px;
  transition: all 0.3s;
  background: var(--light2);
  color: var(--secondary);
}

.soft-skills .badge:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 184, 123, 0.3);
}

/* Contact Section */
.contact-info {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 10px;
  height: 100%;
}

.contact-item {
  font-size: 1rem;
  transition: all 0.3s;
}

.contact-item:hover {
  transform: translateX(5px);
}

.contact-item a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s;
}

.contact-item a:hover {
  color: var(--secondary);
}

.contact-item i {
  color: var(--info);
}

/* Form Styling */
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 184, 123, 0.25);
}

.form-floating label {
  color: #64748B;
}

.btn-send-message {
  color: var(--light);
  background-color: var(--info);
  border-color: var(--primary);
}

/* Call to Action */
.cta-text {
  font-weight: 600;
  background: linear-gradient(45deg, #FFE8B0, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-btn {
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  z-index: 1;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.cta-btn:hover::before {
  left: 100%;
}

.pulse-animation {
  animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
  0% {
    box-shadow: 0 0 0 0 rgba(166, 217, 241, 0.534);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(0, 184, 123, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 184, 123, 0);
  }
}

.bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
}

/* AOS Custom Animations */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="zoom-in"] {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
}

[data-aos="zoom-in"].aos-animate {
  opacity: 1;
  transform: scale(1);
}

/* Dark Mode Specific Styles */
body.dark-mode {
  background-color: #0B1020;
  color: #E8EEF9;
}

body.dark-mode .bg-secondary {
  background-color: #0F172A !important;
}

body.dark-mode .skills-category,
body.dark-mode .education-card,
body.dark-mode .form-control {
  background-color: #1e1e1e;
  color: #E8EEF9;
}

body.dark-mode .timeline-content {
  background: rgba(30, 30, 30, 0.8);
}

body.dark-mode .certification-category {
  background: rgba(30, 30, 30, 0.6);
}

/* Dark Mode - Certification Platforms Fix */
body.dark-mode .certification-platforms {
  background: rgba(30, 30, 30, 0.8);
}

body.dark-mode .digital-badge-section {
  background: rgba(30, 30, 30, 0.8);
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .timeline {
    padding-left: 20px;
  }
  
  .timeline::before {
    left: 5px;
  }
  
  .timeline-marker {
    left: -30px; /* Ajustado para móviles */
  }
  
  .portfolio-stats .stat-item h3 {
    font-size: 2rem;
  }
  
  .education-card {
    margin-bottom: 20px;
  }
  
  .btn-dark-mode {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .platform-logo {
    height: 40px; /* Más pequeño en móviles */
  }
  
  .digital-badge-item img {
    height: 100px; /* Más pequeño en móviles */
  }
}

@media (max-width: 576px) {
  .title {
    font-size: 1.5rem;
  }
  
  .timeline-content {
    padding: 15px;
  }
  
  .education-card {
    padding: 20px;
  }
  
  .portfolio-stats {
    padding: 20px 10px;
  }
  
  .stat-item h3 {
    font-size: 1.5rem;
  }
}