/* =========================================================
   Site customizations on top of DevFolio
   - language toggle, hero kicker/tagline, chips, timeline, education
   ========================================================= */

/* ---- Language toggle ---- */
.lang-switch {
  display: flex;
  align-items: center;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}
.lang-switch .lang-btn {
  background: none;
  border: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}
.lang-switch .lang-btn:hover,
.lang-switch .lang-btn.active {
  opacity: 1;
  color: #0078ff;
}
.lang-switch .lang-sep {
  color: rgba(255, 255, 255, 0.5);
  padding: 0 2px;
}
#header.header-scrolled .lang-switch { border-left-color: rgba(255, 255, 255, 0.35); }
@media (max-width: 991px) {
  .navbar-mobile .lang-switch {
    border-left: 0;
    margin-left: 0;
    padding: 10px 20px;
  }
  .navbar-mobile .lang-switch .lang-btn { color: #1b1b1b; font-size: 15px; }
  .navbar-mobile .lang-switch .lang-btn.active { color: #0078ff; }
  .navbar-mobile .lang-switch .lang-sep { color: #999; }
}

/* Language-scoped blocks: only the active language is rendered */
html[data-lang="en"] .lang-es,
html[data-lang="es"] .lang-en { display: none !important; }

/* ---- Hero ---- */
.hero .hero-kicker {
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}
.hero .hero-tagline {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  margin-top: 1rem;
}
.hero .btn-outline-light { border-radius: 0; }
@media (max-width: 767px) {
  .hero .hero-kicker { font-size: 0.85rem; letter-spacing: 2px; }
  .hero .hero-title { font-size: 2.6rem; }
  .hero .btn { margin-bottom: 8px; }
}

/* ---- Chips ---- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.chips span {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4fb;
  color: #0b4a8f;
  border: 1px solid #d5e4f6;
  white-space: nowrap;
}
.chips.chips-lg span { font-size: 13px; padding: 8px 12px; }
.service-box:hover .chips span {
  background: #ffffff;
  border-color: #c7dcf5;
}

/* ---- Timeline ---- */
.timeline {
  list-style: none;
  padding: 0 0 0 28px;
  margin: 0;
  position: relative;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #d5e4f6;
}
.timeline > li {
  position: relative;
  padding-bottom: 32px;
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li:before {
  content: "";
  position: absolute;
  left: -27px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0078ff;
  box-shadow: 0 0 0 4px #eef4fb;
}
.tl-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #0078ff;
  margin-bottom: 4px;
}
.tl-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1b1b1b;
}
.tl-org {
  font-weight: 400;
  color: #6c757d;
  font-size: 0.95rem;
}
.timeline p { margin-bottom: 8px; text-align: justify; }
.tl-bullets {
  padding-left: 18px;
  margin: 0;
}
.tl-bullets li {
  margin-bottom: 4px;
  text-align: justify;
}

/* ---- Education ---- */
.edu-box { height: 100%; }
.edu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.edu-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed #e3e9f0;
}
.edu-list li:last-child { border-bottom: 0; }
.edu-year {
  flex: 0 0 52px;
  font-weight: 700;
  color: #0078ff;
  font-size: 0.95rem;
  padding-top: 2px;
}
.edu-list strong {
  display: block;
  color: #1b1b1b;
  font-weight: 600;
  line-height: 1.35;
}
.edu-org {
  display: block;
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 2px;
}
.edu-note {
  display: block;
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 4px;
}

/* ---- Small polish ---- */
.about-info a { color: #0078ff; }
.list-ico a { color: inherit; }
.list-ico a:hover { color: #0078ff; }
.counter-text { letter-spacing: 1px; }
.section-counter .counter-box .counter-num .counter { min-height: 1em; }

/* =========================================================
   Animated expertise visuals (inline SVG, CSS + SMIL)
   ========================================================= */
.service-box .service-ico { min-height: 164px; }
.svc-viz {
  width: 156px;
  height: 156px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #eef4fb 70%, #e3edf9 100%);
  box-shadow: inset 0 0 0 1px #d5e4f6;
  transition: box-shadow 0.3s, transform 0.3s;
}
.svc-viz svg { width: 100%; height: 100%; display: block; }
.service-box:hover .svc-viz {
  box-shadow: inset 0 0 0 1px #0078ff, 0 8px 24px rgba(0, 120, 255, 0.18);
  transform: translateY(-2px);
}

/* shared primitives (all motion is SMIL inside the SVG for Safari/Chrome/Firefox parity) */
.vz-pulse { pointer-events: none; }
.svc-viz text { user-select: none; }

@media (prefers-reduced-motion: reduce) {
  .svc-viz animate, .svc-viz animateMotion, .svc-viz animateTransform { display: none; }
}

/* ---- Education: institution logos (official files in assets/img/logos/, monogram fallback) ---- */
.edu-list li { align-items: flex-start; }
.edu-logo {
  flex: 0 0 92px;
  width: 92px;
  height: 52px;
  border-radius: 10px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e3e9f0;
  box-shadow: 0 1px 3px rgba(11, 74, 143, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.edu-logo img {
  max-width: 84px;
  max-height: 44px;
  object-fit: contain;
  display: block;
}
.edu-mono {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0b4a8f;
  background: linear-gradient(135deg, #eef4fb, #dbe8f8);
}
.edu-year { flex-basis: 44px; }
.edu-list li > div { flex: 1 1 0; min-width: 0; }
@media (max-width: 575px) {
  .edu-list li { flex-wrap: wrap; }
  .edu-list li > div { flex-basis: 100%; }
}

/* ---- Executive card (About) ---- */
.exec-card {
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
  border: 1px solid #e3ecf7;
  border-radius: 16px;
  padding: 24px 22px 20px;
  text-align: center;
  height: 100%;
}
.exec-photo {
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #0078ff, #00e0d0);
  box-shadow: 0 10px 28px rgba(0, 120, 255, 0.22);
}
.exec-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
  border: 3px solid #fff;
  display: block;
}
.exec-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0 0 4px;
  line-height: 1.25;
}
.exec-role {
  color: #4b5563;
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.exec-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e6f0ff;
  color: #0b4a8f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}
.exec-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
  font-size: 0.9rem;
  color: #4b5563;
}
.exec-meta li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #e6edf5;
}
.exec-meta li:last-child { border-bottom: 0; }
.exec-meta i { color: #0078ff; font-size: 1rem; line-height: 1.35; flex: 0 0 auto; }
.exec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.exec-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cfe0f7;
  background: #fff;
  color: #0b4a8f;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.exec-btn:hover { background: #eef4fb; color: #0078ff; border-color: #0078ff; }
.exec-btn-primary { background: #0078ff; border-color: #0078ff; color: #fff; }
.exec-btn-primary:hover { background: #0062d1; color: #fff; }
.exec-focus {
  text-align: left;
  border-top: 1px solid #e6edf5;
  padding-top: 16px;
}
.exec-focus-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6c757d;
  margin: 0 0 10px;
}
.exec-focus ul { list-style: none; padding: 0; margin: 0; }
.exec-focus li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e6edf5;
  font-size: 0.9rem;
  color: #1b1b1b;
  transition: transform 0.2s, border-color 0.2s;
}
.exec-focus li:hover { transform: translateX(3px); border-color: #0078ff; }
.exec-focus li i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0078ff, #00b8a9);
  color: #fff;
  font-size: 0.95rem;
  flex: 0 0 auto;
}
@media (max-width: 767px) {
  .exec-card { margin-bottom: 24px; }
}

/* header brand mark sizing (SVG has no intrinsic size) */
#header .logo img { width: 36px; height: 36px; max-height: 36px; margin-right: 8px; }

/* ---- Impact tiles (About, right column) ---- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.impact-tile {
  border: 1px solid #e3ecf7;
  border-radius: 12px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #f7faff, #ffffff);
  text-align: center;
}
.impact-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0078ff;
  line-height: 1.1;
}
.impact-lbl {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #4b5563;
  line-height: 1.3;
}
@media (max-width: 991px) { .impact-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Expertise cards: equal height per row, chips anchored to the bottom ---- */
#expertise .row > [class*="col-"] { display: flex; }
#expertise .service-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}
#expertise .service-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
#expertise .s-title {
  min-height: 2.7em;                /* room for two-line titles so descriptions start aligned */
  display: flex;
  align-items: center;
  justify-content: center;
}
#expertise .s-description { flex: 1 1 auto; }
#expertise .chips { margin-top: auto; padding-top: 14px; justify-content: center; }
@media (max-width: 767px) {
  #expertise .s-title { min-height: 0; }
}
/* all six cards identical height (grid with equal rows), not just per row */
@media (min-width: 768px) {
  #expertise .row:has(.service-box) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
  }
  #expertise .row:has(.service-box) > [class*="col-"] { width: auto; max-width: none; }
}

/* ---- Hands-on Lab ---- */
.lab-row-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #0b4a8f;
  margin: 34px 0 6px;
  padding-left: 12px;
  border-left: 3px solid #0078ff;
}
.lab-row-note { color: #6c757d; font-size: 0.9rem; margin: 0 0 18px; }
.lab-grid > [class*="col-"] { display: flex; margin-bottom: 24px; }
.lab-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 13px 8px -10px rgba(0, 0, 0, 0.1);
  border: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform 0.25s, box-shadow 0.25s;
}
.lab-card:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -14px rgba(0, 120, 255, 0.35); }
.lab-cover { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #0b4a8f; }
.lab-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.lab-card:hover .lab-cover img { transform: scale(1.03); }
.lab-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1 1 auto; }
.lab-kicker {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: #0078ff; margin-bottom: 6px;
}
.lab-title { font-size: 1.1rem; font-weight: 700; color: #1b1b1b; margin: 0 0 8px; line-height: 1.3; }
.lab-desc { font-size: 0.92rem; color: #4b5563; text-align: justify; margin: 0 0 4px; flex: 1 1 auto; }
.lab-card .chips { margin-top: 10px; }
.lab-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lab-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid #cfe0f7; background: #fff; color: #0b4a8f;
  font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: all 0.2s;
}
.lab-link:hover { background: #eef4fb; border-color: #0078ff; color: #0078ff; }
.lab-link-primary { background: #0078ff; border-color: #0078ff; color: #fff; }
.lab-link-primary:hover { background: #0062d1; color: #fff; }

/* featured (wide) card */
.lab-featured { flex-direction: row; margin-bottom: 8px; }
.lab-featured .lab-cover { flex: 0 0 42%; aspect-ratio: auto; background: #0b2a6b; display:flex; align-items:center; }
.lab-featured .lab-cover img { object-fit: contain; }
.lab-featured .lab-body { padding: 28px 30px; }
.lab-featured .lab-title { font-size: 1.45rem; }
.lab-featured .lab-desc { font-size: 0.98rem; }
@media (max-width: 991px) {
  .lab-featured { flex-direction: column; }
  .lab-featured .lab-cover { flex: none; aspect-ratio: 3 / 2; }
}
.lab-grid { justify-content: center; }
