/* =========================================================
   DARK MODE – Estilo ChatGPT (Elegante y Minimalista)
   ========================================================= */
:root {
  --color-primary: #10a37f;
  --color-bg: #141515;
  --color-bg-elevated: #1e1f20;
  --color-text: #e3e3e4;
  --color-muted: #9b9c9e;
  --color-border: #2a2b2d;
  --font-base: 'Open Sans', sans-serif;
  --font-heading: 'Playfair Display', serif;
}

/* =========================================================
   BASE
   ========================================================= */
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
}

p {
  color: var(--color-muted);
}

canvas {
  background: transparent !important;
}

/* =========================================================
   NAVBAR
   ========================================================= */
nav {
  background: #1e1f20ee;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 20px;
}

/* Estilo para la barra de navegación en modo móvil */
@media (max-width: 991px) {
  .navbar {
    border-bottom: 1px solid #2a2b2d !important; /* Borde claro para pantallas pequeñas */
  }
  /* Cambiar color del icono del menú hamburguesa */
  .navbar-toggler-icon {
    background-color: #767677; /* Cambiar color del icono en móvil */
  }
}

.navbar-brand {
  color: var(--color-text) !important;
}

nav .nav-link {
  color: var(--color-muted);
  font-weight: 400;
  padding: 8px 12px;
  transition: 0.2s;
}

nav .nav-link:hover {
  color: var(--color-primary);
}

nav .nav-link.active {
  color: var(--color-primary) !important;
  font-weight: 600;
}

/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */
.container-main {
  max-width: 900px;
  margin: 120px auto 60px;
  padding: 25px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

/* =========================================================
   PERFIL
   ========================================================= */
.profile-wrapper {
  position: relative;
  height: 380px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.profile-wrapper canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.profile-wrapper .profile {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
}

.profile img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
}

.social-links a {
  color: var(--color-muted);
  font-size: 1.3rem;
  margin: 0 10px;
  transition: 0.2s;
}

.social-links a:hover {
  color: var(--color-primary);
}

/* =========================================================
   SOBRE MÍ
   ========================================================= */
.section.about,
.section.sql {
  padding: 40px 20px;
}

.section.about h2,
.section.sql h2 {
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
  padding-bottom: 8px;
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
  border-left: 2px solid var(--color-primary);
  padding-left: 30px;
  margin-top: 40px;
}

.timeline-item {
  margin-bottom: 30px;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 5px;
}

.teaching-card {
  background: var(--color-bg-elevated);
  border-left: 4px solid var(--color-primary);
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: 0.2s ease;
}

.teaching-card:hover {
  transform: translateX(3px);
}

/* ✔ CORRECCIÓN — FECHAS VISIBLES */
.timeline-item p.text-muted {
  color: #c7c8c9 !important;
  font-weight: 500;
}

/* =========================================================
   TARJETAS DE PUBLICACIONES
   ========================================================= */
.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 10px;
}

.card-title {
  color: var(--color-text);
}

.card-subtitle {
  color: var(--color-muted) !important;
}

.card-text {
  color: var(--color-muted);
}

.card-link {
  color: var(--color-primary);
  font-weight: 600;
}

.card:hover {
  transform: scale(1.01);
  background: #232425;
  transition: 0.2s;
}

/* =========================================================
   FILTROS
   ========================================================= */
.filter-btn.active {
  background: var(--color-primary);
  color: #fff !important;
}

.form-control,
.form-select {
  background: #101111;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.form-control::placeholder {
  color: #7a7a7a;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  text-align: center;
  color: var(--color-muted);
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
}

/* =========================================================
   Estilo tipo Jupyter Notebook
   ========================================================= */
.notebook-cell {
  background-color: #1e1e1e;
  color: #dcdcdc;
  font-family: 'Courier New', Courier, monospace;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  overflow-x: auto;
}

.notebook-description {
  background-color: #f7f7f7;
  color: #333;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.section.sql h3 {
  margin-top: 2rem;
}

/* =========================================================
   Resaltado de sintaxis SQL tipo Jupyter Notebook
   ========================================================= */
.sql-keyword {
  color: #c586c0;
  font-weight: bold;
}

.sql-function {
  color: #dcdcaa;
}

.sql-string {
  color: #ce9178;
}

.sql-number {
  color: #b5cea8;
}

.sql-comment {
  color: #6a9955;
  font-style: italic;
}

.notebook-cell pre {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================================
   Estilo de código Python tipo Jupyter Notebook
   ========================================================= */

.python-cell {
  background-color: #1a1b1c;
  color: #e2e2e2;
  font-family: 'Courier New', monospace;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  overflow-x: auto;
}

/* syntax highlighting python */
.py-keyword {
  color: #569cd6;
  font-weight: 600;
}

.py-string {
  color: #ce9178;
}

.py-number {
  color: #b5cea8;
}

.py-comment {
  color: #6a9955;
  font-style: italic;
}

.py-func {
  color: #dcdcaa;
  font-weight: 500;
}

.py-builtin {
  color: #4fc1ff;
}

/* Ajustes del <pre> */
.python-cell pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================================
   TARJETAS DE PROYECTO (ETL, EDA, etc.)
   ========================================================= */
.project-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  transition: 0.25s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  background: #232425;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-text);
  margin-bottom: 10px;
}

.project-tech {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-card p {
  margin-bottom: 12px;
}

.project-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

.kaggle-link {
  display: flex;
  align-items: center;
  gap: 4px;
  /* separa los íconos */
  color: inherit;
}

.kaggle-link svg {
  margin-top: 1px;
  /* pequeña alineación vertical */
}

.badge-soft {
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Colores suaves */
.badge-soft.admin {
  background-color: #e3efff;
  /* azul pastel */
  color: #2a4a7b;
}

.badge-soft.analisis {
  background-color: #e6f7ea;
  /* verde pastel */
  color: #2e6044;
}

.badge-soft.desarrollo {
  background-color: #e8f6f8;
  /* celeste suave */
  color: #2a5560;
}

/**/
.btn-cv {
  display: inline-block;
  padding: 10px 20px;
  background: #4a90e2;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
}

.btn-cv:hover {
  background: #78797a;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #444;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.25s;
}

.btn-download:hover {
  background: #222;
}

.cv-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.cv-container {
  display: flex;
  justify-content: center;
  margin: 20px 0 50px 0;
  /* margen superior 20px, inferior 50px */
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #444;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.25s;
}

.btn-download:hover {
  background: #222;
}

/*cv*/
.section {
  margin-bottom: 30px;
}

.section h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.section h3 {
  font-size: 20px;
  margin-top: 15px;
}

.section ul {
  list-style-type: disc;
  padding-left: 20px;
}

.tech-stack-icons {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.tech-stack-icons svg {
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tech-stack-icons svg:hover {
  opacity: 1;
  transform: scale(1.12);
}

.cv-container {
  display: flex;
  justify-content: center;
  margin: 20px 0 50px 0;
  /* separación del footer */
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #444;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.25s;
}

.btn-download:hover {
  background: #222;
}

/* =========================================================
   GIF DE LAS TARJETAS DE PROYECTO (ETL, EDA, etc.)
   ========================================================= */

.gif-container {
  display: inline-block;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
  max-width: 100%;
}

.gif-container img {
  width: 100%;
  /* que se adapte al ancho del contenedor */
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  display: block;
}

/* Hover para escritorio */
@media (hover: hover) {
  .gif-container:hover {
    transform: scale(1.5);
    z-index: 10;
  }
}

/* Tap para móviles: se puede usar toggle de clase con JS */
.zoom-active {
  transform: scale(1.5);
  z-index: 10;
}