/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Pablo Ruiz Soria personal website
   Paleta: navy + azul + naranja cálido  |  Bootstrap 5 base
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --navy:          #0f2d52;
  --navy-dark:     #091d36;
  --blue:          #1e5799;
  --blue-light:    #2e86de;
  --accent:        #e67e22;
  --accent-hover:  #cf6d17;
  --accent-light:  #fdebd0;
  --bg:            #f4f7fb;
  --bg-white:      #ffffff;
  --text:          #1a2332;
  --text-muted:    #5a7184;
  --border:        #d5e0ea;
  --shadow-sm:     0 2px 8px rgba(15, 45, 82, 0.10);
  --shadow-md:     0 4px 20px rgba(15, 45, 82, 0.13);
  --shadow-lg:     0 8px 40px rgba(15, 45, 82, 0.16);
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    0.25s ease;
  --font:          'Inter', system-ui, sans-serif;
}

/* ── Reset y base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;           /* altura del navbar fijo */
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Accesibilidad: skip link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Foco accesible global ──────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════ */
#navbar {
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 1rem 0;
}

#navbar.navbar--scrolled {
  background: var(--navy-dark);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 50%;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.brand-name {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.2px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='https://shadcn.io/og?iconName=three-line-horizontal&iconLibrary=akar-icons' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile: menú oscuro */
@media (max-width: 991px) {
  #navbar { background: var(--navy-dark); }
  #navbarContent {
    background: var(--navy-dark);
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.5rem;
  }
}

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--blue) 100%);
  position: relative;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

/* Patrón decorativo */
.hero-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(230,126,34,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.78);
  max-width: 520px;
  line-height: 1.7;
}

/* Botones hero */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.6rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-accent:hover, .btn-accent:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,126,34,0.35);
}

.btn-outline-light {
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.6rem;
  font-weight: 600;
  transition: transform var(--transition);
}
.btn-outline-light:hover { transform: translateY(-2px); }

/* Avatar placeholder */
.avatar-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #f39c12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 8px rgba(255,255,255,0.1), var(--shadow-lg);
}
.avatar-placeholder span {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════
   SECCIONES COMUNES
   ═══════════════════════════════════════════════ */
.section-padding {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 48px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.subsection-title i { color: var(--accent); }

/* ═══════════════════════════════════════════════
   SOBRE MÍ
   ═══════════════════════════════════════════════ */
.profile-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.profile-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.profile-card-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
  color: var(--accent);
}

.profile-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.profile-card p { color: var(--text-muted); }
.profile-card p strong { color: var(--text); }

/* Pasiones */
.passion-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.passion-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.passion-icon {
  color: var(--accent);
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

/* ═══════════════════════════════════════════════
   FORMACIÓN ACADÉMICA
   ═══════════════════════════════════════════════ */
.academic-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  transition: box-shadow var(--transition);
}
.academic-card:hover { box-shadow: var(--shadow-sm); }

.academic-card-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 2px;
  min-width: 55px;
}

.academic-card-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

/* Placeholder note */
.placeholder-note {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  color: #92400e;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ═══════════════════════════════════════════════
   ESTADÍSTICAS
   ═══════════════════════════════════════════════ */
.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-sm); }

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-coordinador .stat-number { color: #7c3aed; }
.stat-ponente    .stat-number { color: #dc2626; }
.stat-tutor      .stat-number { color: #059669; }
.stat-participante .stat-number { color: #2563eb; }
.stat-horas      .stat-number { color: var(--accent); }

/* ═══════════════════════════════════════════════
   FILTROS DE FORMACIÓN
   ═══════════════════════════════════════════════ */
.formacion-filters {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition);
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.filter-btn[aria-pressed='true'] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   TARJETAS DE FORMACIÓN
   ═══════════════════════════════════════════════ */
.formacion-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.formacion-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.formacion-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.formacion-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.formacion-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.formacion-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Badges de rol */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-coordinador { background: #ede9fe; color: #6d28d9; }
.badge-ponente     { background: #fee2e2; color: #b91c1c; }
.badge-tutor       { background: #d1fae5; color: #065f46; }
.badge-participante { background: #dbeafe; color: #1d4ed8; }
.badge-asistente   { background: #f3f4f6; color: #374151; }

.incomplete-badge {
  font-size: 0.85rem;
  color: #f59e0b;
}

/* ═══════════════════════════════════════════════
   EXPERIENCIA — TIMELINE
   ═══════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.875rem;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.timeline-content p { color: var(--text-muted); margin-bottom: 0.25rem; font-size: 0.92rem; }

/* ═══════════════════════════════════════════════
   INTERESES
   ═══════════════════════════════════════════════ */
.interest-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.interest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #f39c12);
}
.interest-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.interest-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.interest-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.interest-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.tech-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   CONTACTO
   ═══════════════════════════════════════════════ */
.bg-navy {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
}
.bg-navy .section-header h2 { color: #fff; }
.bg-navy .section-header h2::after { background: var(--accent); }

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: #fff;
  transition: background var(--transition), transform var(--transition);
  height: 100%;
}
.contact-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-3px);
  color: #fff;
}

.contact-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.55);
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.back-to-top:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════
   ESTADO VACÍO
   ═══════════════════════════════════════════════ */
#formacion-empty {
  padding: 3rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 767px) {
  .section-padding { padding: 3.5rem 0; }
  .avatar-placeholder { width: 160px; height: 160px; }
  .avatar-placeholder span { font-size: 2.6rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .filter-btn { font-size: 0.78rem; padding: 0.35rem 0.75rem; }
  .formacion-filters { padding: 1rem; }
  .stat-number { font-size: 1.5rem; }
}

@media (max-width: 575px) {
  .formacion-card-footer { flex-direction: column; gap: 0.4rem; }
}

/* ═══════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════ */
@media print {
  #navbar, .hero-cta, .filter-buttons, #btn-reset-filters, .back-to-top { display: none !important; }
  .hero-section { min-height: auto; padding: 2rem 0; background: none; color: var(--text); }
  .hero-title, .hero-subtitle, .hero-eyebrow { color: var(--navy); }
  .hero-description { color: var(--text); }
  .avatar-placeholder { display: none; }
  .bg-navy { background: none; }
  .contact-card { border: 1px solid var(--border); color: var(--text); }
  .contact-icon, .contact-label, .contact-value { color: var(--text); }
}
