/* ========================================
   Marco Soto Portfolio - Dark Theme
   Font: JetBrains Mono
   Paleta tomada del logo { M $ }:
     cian #00e5ff  ·  rosa #ff3d6c  ·  blanco hielo #e6edf3
======================================== */

/* CSS Variables */
:root {
  /* Base: escala de 4 pasos. La profundidad viene del valor, no del color */
  --bg: #0a111c;
  --surface: #111c2b; /* tarjetas */
  --surface2: #1a2839; /* bloques dentro de una tarjeta */
  --well: #070d16; /* hundido: terminales y codigo */
  --border: #22344a;

  /* Acentos del logo */
  --accent: #00e5ff; /* cian: red, infra, estado "vivo" */
  --accent2: #ff3d6c; /* rosa: datos, seguridad, enfasis */
  --accent3: #9db4d0; /* hielo: etiquetas y apoyo, derivado del blanco */
  --warn: #f5a524; /* ambar: notas y avisos, fuera de la marca a proposito */
  --danger: #ff3d6c;

  --text: #e6edf3; /* blanco exacto del logo */
  --text-muted: #7d93a8;

  /* "Online" pasa a ser cian: una sola familia para estado */
  --green: #00e5ff;
  --neon-green: #5ffbff;

  /* Elevacion */
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.3);
  --edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
body {
  font-family: "JetBrains Mono", monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Grid Background */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Header */
header {
  position: relative;
  z-index: 10;
  padding: 60px 40px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  /* Luz de marca detras del hero: cian a la izquierda, rosa a la derecha.
     Es la unica decoracion de color libre de toda la pagina. */
  background:
    radial-gradient(
      620px 320px at 22% 0%,
      rgba(0, 229, 255, 0.09),
      transparent 70%
    ),
    radial-gradient(
      560px 300px at 82% 10%,
      rgba(255, 61, 108, 0.07),
      transparent 70%
    );
}

.header-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

h1 span {
  color: var(--accent);
}

.header-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 20px;
}

.tech-stack {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tags */
.tag {
  display: inline-block;
  background: rgba(157, 180, 208, 0.1);
  border: 1px solid rgba(157, 180, 208, 0.3);
  color: var(--accent3);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Navigation Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 30px 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab.active {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.tab-icon {
  font-size: 1rem;
}

/* Main Content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px 80px;
  position: relative;
  z-index: 10;
}

/* Sections */
.section {
  display: none;
  animation: slideIn 0.3s ease;
}

.section.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header h2 .icon {
  margin-right: 10px;
  color: var(--accent);
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Architecture Diagram */
.architecture-diagram {
  background: linear-gradient(180deg, #14212f 0%, #0e1826 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 24px;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 20px;
}

.arch-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 50px;
  text-align: right;
  flex-shrink: 0;
}

.arch-block {
  flex: 1;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid;
}

.arch-isp {
  background: rgba(255, 61, 108, 0.1);
  border-color: var(--danger);
}

.arch-rpi {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent);
}

.arch-nginx {
  background: rgba(157, 180, 208, 0.1);
  border-color: var(--accent3);
}

.block-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.block-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.arch-isp .block-title {
  color: var(--danger);
}
.arch-rpi .block-title {
  color: var(--accent);
}
.arch-nginx .block-title {
  color: var(--accent3);
}

.block-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.arch-arrow {
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  padding: 10px 0;
  padding-left: 70px;
}

/* Info Box */
.info-box {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.info-box h3 {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.info-box ul {
  list-style: none;
  padding-left: 0;
}

.info-box li {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-muted);
  padding: 4px 0;
}

.info-box li strong {
  color: var(--text);
}

/* Command Block */
.cmd {
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  position: relative;
  overflow-x: auto;
}

.cmd-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.cmd code {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  /* Lines are real block elements (.line), so source indentation is never
     rendered as text. Do NOT switch this back to pre/pre-wrap. */
  white-space: normal;
  text-align: left;
}

/* One rendered line of terminal output */
.cmd .line {
  display: block;
}

/* Blank line before a new section heading */
.cmd .line.gap {
  margin-top: 1.5em;
}

/* Wrapped lines hang under the arrow instead of resetting to the margin */
.cmd .line:has(> .keyword) {
  padding-left: 1.6em;
  text-indent: -1.6em;
}

.cmd .prompt {
  color: var(--accent);
}
.cmd .keyword {
  color: var(--accent3);
}
.cmd .option {
  color: var(--accent2);
}
.cmd .comment {
  color: var(--text-muted);
  font-style: italic;
}
.cmd .output {
  color: #93a9bf;
}

.cmd.inline {
  display: flex; /* Cambiado para mejor control de alineación */
  align-items: center;
  justify-content: flex-start; /* Alinea el contenido al inicio */
  padding: 8px 12px;
  margin: 8px 0;
}

.cmd.inline code {
  display: inline;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card), var(--edge-top);
  transition: border-color 0.2s;
}

.service-card:hover {
  border-color: var(--accent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Iconos de servicio: solo tres familias.
   cian = red / trafico · rosa = seguridad y datos · hielo = automatizacion */

/* Vaultwarden - credenciales */
.vault-icon {
  background: rgba(255, 61, 108, 0.1);
  border: 1px solid rgba(255, 61, 108, 0.3);
  color: var(--accent2);
}

/* Portfolio - sitio propio */
.portfolio-icon {
  background: rgba(255, 61, 108, 0.1);
  border: 1px solid rgba(255, 61, 108, 0.3);
  color: var(--accent2);
}

/* Nginx Proxy Manager - borde de red */
.nginx-icon {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

/* Pi-hole - bloqueo / filtrado */
.pihole-icon {
  background: rgba(255, 61, 108, 0.1);
  border: 1px solid rgba(255, 61, 108, 0.3);
  color: var(--accent2);
}

/* DuckDNS - resolucion de dominio */
.duck-icon {
  background: rgba(245, 165, 36, 0.1);
  border: 1px solid rgba(245, 165, 36, 0.3);
  color: var(--warn);
}

/* Watchtower - automatizacion */
.watchtower-icon {
  background: rgba(157, 180, 208, 0.1);
  border: 1px solid rgba(157, 180, 208, 0.3);
  color: var(--accent3);
}

/* Telegram Bot - control remoto */
.bot-icon {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

/* WireGuard - tunel / red */
.vpn-icon {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

.card-status {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 20px;
}

.card-status.running {
  background: rgba(0, 229, 255, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.card-specs {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.spec {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 4px 0;
}

.spec-label {
  color: var(--text-muted);
}

.spec-value {
  color: var(--accent2);
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Security List */
.security-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.security-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}

.security-item:hover {
  border-color: var(--green);
}

.security-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.security-icon.secure {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--green);
}

.security-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.security-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Experience Timeline */
.experience-timeline {
  position: relative;
  padding-left: 30px;
  margin-bottom: 40px;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-marker {
  position: absolute;
  left: -30px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-card), var(--edge-top);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-header h4 {
  font-size: 1rem;
  font-weight: 700;
}

.timeline-company {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(0, 229, 255, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.timeline-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-content > p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.timeline-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Certifications */
.certs-section {
  margin-bottom: 30px;
}

.certs-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-card), var(--edge-top);
}

.cert-badge {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Scrum Study - hielo (formacion / metodologia) */
.scrum-badge {
  background: rgba(157, 180, 208, 0.1);
  border: 1px solid rgba(157, 180, 208, 0.3);
  color: var(--accent3);
}

/* Cisco / CCNP - cian (redes) */
.cisco-badge {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}
.header-description {
  max-width: 700px;
  margin: 24px auto 0;
  padding: 0 20px;
}

.header-description p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

.header-description strong {
  color: var(--accent); /* Para que resalten los conceptos clave */
}

/* Ajuste general para íconos en experiencia (reemplaza emojis) */
.timeline-marker-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.cert-badge.cisco {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

.cert-badge.nvidia {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--green);
}

.cert-badge.certiprof {
  background: rgba(245, 165, 36, 0.1);
  border: 1px solid rgba(245, 165, 36, 0.3);
  color: var(--warn);
}

.cert-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cert-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Education Box */
.education-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card), var(--edge-top);
}

.education-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.edu-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.edu-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  padding: 30px 40px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow:
    0 0 10px var(--neon-green),
    0 0 20px var(--neon-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 40px 20px 30px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .tabs {
    padding: 20px;
    gap: 6px;
  }

  .tab {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  main {
    padding: 0 20px 60px;
  }

  .architecture-diagram {
    padding: 20px;
  }

  .arch-layer {
    flex-direction: column;
    gap: 10px;
  }

  .arch-label {
    width: auto;
    text-align: center;
  }

  .arch-arrow {
    padding-left: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .certs-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .security-item {
    flex-direction: column;
    text-align: center;
  }

  .security-icon {
    margin: 0 auto;
  }

  .experience-timeline {
    padding-left: 25px;
  }

  .timeline-marker {
    left: -25px;
  }
}

@media (max-width: 480px) {
  .tab {
    padding: 8px 12px;
    font-size: 0.7rem;
  }

  .tab-icon {
    display: none;
  }

  .timeline-header {
    flex-direction: column;
  }
}

/* ========================================
   CV LAYOUT ADDITIONS
======================================== */

/* Inline lucide icons sizing */
h1 i,
.header-sub i {
  width: 1em;
  height: 1em;
}
.tab-icon i {
  width: 16px;
  height: 16px;
}
.section-header h2 .icon i {
  width: 20px;
  height: 20px;
  vertical-align: -3px;
}

/* Header title tweaks */
h1 span {
  color: var(--accent);
}

/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px auto 0;
  max-width: 640px;
}

.stat {
  flex: 1 1 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s;
}

.stat[data-goto] {
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.stat[data-goto]:hover,
.stat[data-goto]:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

.stat:hover {
  border-color: var(--accent);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
}

/* CTA buttons */
.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta i {
  width: 16px;
  height: 16px;
}

.cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cta-primary {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.cta-primary:hover {
  background: rgba(0, 229, 255, 0.18);
}

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: border-color 0.2s;
}

.skill-group:hover {
  border-color: var(--accent);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.skill-group-header i {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.skill-group-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Featured project */
.project-featured {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.06);
}

.project-featured-tag {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
}

.project-featured-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.rpi-icon {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

/* CI/CD Pipeline - ambar (Tekton/Argo) */
.pipeline-icon {
  background: rgba(245, 165, 36, 0.1);
  border: 1px solid rgba(245, 165, 36, 0.3);
  color: var(--warn);
}

.project-featured-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.project-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

.highlight-chip i {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.project-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--warn);
  background: rgba(245, 165, 36, 0.08);
  border: 1px dashed rgba(245, 165, 36, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
}

.project-note i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* cert-badge cisco already exists; ensure a fallback variant */
.cert-badge.cisco {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .stats-bar {
    max-width: 100%;
  }
  .stat {
    flex: 1 1 40%;
  }
  .cta {
    flex: 1 1 auto;
    justify-content: center;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .project-featured-header {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   PROFILE TERMINAL — Quick Facts family
======================================== */
.cmd-terminal {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

/* Semaforo de macOS: es cromo de ventana, no marca */
.dot-red {
  background: #ff5f56;
}
.dot-amber {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}

.terminal-title {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.cmd-terminal code {
  padding: 18px 20px;
}

/* ========================================
   PROJECTS TAB — pulse indicator
======================================== */
.tab-featured {
  position: relative;
  border-color: rgba(0, 229, 255, 0.35);
}

.tab-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 2px;
  flex-shrink: 0;
  animation: tabPulse 2s infinite;
}

@keyframes tabPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(0, 229, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 229, 255, 0);
  }
}

/* ========================================
   FEATURED PROJECT — breathing glow
======================================== */
.project-featured {
  animation: cardBreathe 4s ease-in-out infinite;
}

@keyframes cardBreathe {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.06);
  }
  50% {
    box-shadow: 0 0 45px rgba(0, 229, 255, 0.18);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tab-pulse,
  .project-featured,
  .status-dot {
    animation: none;
  }
}

/* ========================================
   PROJECT CARDS (clickable → modal)
======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  outline: none;
}

.project-card.is-featured {
  border-color: var(--accent);
  animation: cardBreathe 4s ease-in-out infinite;
}

.project-card-tag {
  position: absolute;
  top: -11px;
  left: 20px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Variante secundaria: outline discreto, no compite con "Featured" */
.project-card-tag.tag-alt {
  background: var(--surface);
  color: var(--warn);
  border: 1px solid rgba(245, 165, 36, 0.45);
}

.project-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.project-card-head h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.project-card .project-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.project-card .project-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-card-foot {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.view-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease;
}

.view-more .vm-prompt {
  color: var(--text-muted);
}

.view-more i {
  width: 15px;
  height: 15px;
}

.project-card:hover .view-more {
  gap: 12px;
}

/* ========================================
   MODAL
======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal {
  width: 100%;
  max-width: 680px;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.modal-bar-title {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.modal-body {
  padding: 24px;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.detail-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.detail-section {
  margin-bottom: 22px;
}

.detail-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.detail-section h4 i {
  width: 16px;
  height: 16px;
}

.detail-section > p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.detail-list {
  list-style: none;
  padding: 0;
}

.detail-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.detail-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Lock scroll when modal open */
body.modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card.is-featured,
  .modal {
    animation: none;
    transition: none;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .modal-overlay {
    padding: 12px;
  }
}

/* ========================================
   CV LANGUAGE DROPDOWN
======================================== */
.cta-dropdown {
  position: relative;
  display: inline-block;
}

.cta-dropdown .cta {
  cursor: pointer;
}

.cta-chevron {
  width: 14px !important;
  height: 14px !important;
  transition: transform 0.2s ease;
}

.cta-dropdown.open .cta-chevron {
  transform: rotate(180deg);
}

.cta-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 6px;
  z-index: 60;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: menuIn 0.16s ease;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.cta-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition:
    background 0.15s,
    color 0.15s;
}

.cta-menu a:hover,
.cta-menu a:focus-visible {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent);
  outline: none;
}

.lang-code {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent);
}

/* ========================================
   MODAL — functional red traffic light
======================================== */
.dot-close {
  cursor: pointer;
  position: relative;
  transition: filter 0.15s ease;
}

.dot-close:hover,
.dot-close:focus-visible {
  filter: brightness(1.25);
  outline: none;
}

/* Show an "×" inside the red dot on hover of the whole dot group */
.dot-close::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.terminal-dots:hover .dot-close::after,
.dot-close:focus-visible::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cta-menu {
    animation: none;
  }
  .cta-chevron {
    transition: none;
  }
}

@media (max-width: 768px) {
  .cta-dropdown {
    flex: 1 1 auto;
  }
  .cta-dropdown .cta {
    width: 100%;
    justify-content: center;
  }
}

/* Header must outrank .tabs so the CV dropdown can overlay them.
   Both were at z-index 10, and .tabs comes later in the DOM, so it won. */
header {
  z-index: 20;
}

/* ========================================
   GENERIC DETAIL TRIGGERS
   Applied automatically by initDetailModal() to any element that
   contains a <template class="detail-content">. Works for project
   cards, timeline items and cert cards alike.
======================================== */

.has-detail {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.has-detail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* .project-card already defines its own hover lift, so scope the
   generic one to everything that isn't a project card. */
.has-detail:not(.project-card):hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Footer affordance — reuses the terminal prompt language of the
   project cards so every detail trigger reads as the same gesture. */
.detail-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease;
}

.detail-cue .vm-prompt {
  color: var(--text-muted);
}

.detail-cue i {
  width: 14px;
  height: 14px;
}

.has-detail:hover .detail-cue {
  gap: 12px;
}

/* Cert cards are denser than timeline items */
.cert-card.has-detail {
  flex-wrap: wrap;
}

.cert-card.has-detail .detail-cue {
  margin-top: 10px;
  padding-top: 10px;
  font-size: 0.72rem;
}

/* ---- Icon variants for the upcoming Experience / Education details ---- */
.work-icon {
  background: rgba(157, 180, 208, 0.1);
  border: 1px solid rgba(157, 180, 208, 0.3);
  color: var(--accent3);
}

.cert-icon {
  background: rgba(245, 165, 36, 0.1);
  border: 1px solid rgba(245, 165, 36, 0.3);
  color: var(--warn);
}

@media (prefers-reduced-motion: reduce) {
  .has-detail,
  .detail-cue {
    transition: none;
  }
  .has-detail:not(.project-card):hover {
    transform: none;
  }
}

/* ========================================
   CREDENTIALS — real badge art + external verification
======================================== */

/* Badge art replaces the text badge where the issuer provides one */
.cert-badge.badge-art {
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  padding: 0;
}

.cert-badge.badge-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Text badges for credentials with no issuer artwork */
.cert-badge.unam {
  background: rgba(157, 180, 208, 0.1);
  border: 1px solid rgba(157, 180, 208, 0.3);
  color: var(--accent3);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.15;
}

.cert-badge.scrum-badge {
  background: rgba(157, 180, 208, 0.1);
  border: 1px solid rgba(157, 180, 208, 0.3);
  color: var(--accent3);
}

/* A credential card that links out to the issuer for verification */
a.cert-card {
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

a.cert-card:hover,
a.cert-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

a.cert-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cert-verify {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}

.cert-verify i {
  width: 12px;
  height: 12px;
}

a.cert-card:hover .cert-verify {
  text-decoration: underline;
}

/* Credential earned but not yet linkable */
.cert-pending {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Small clarifying note under a credential group heading */
.certs-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: -8px 0 16px;
}

@media (prefers-reduced-motion: reduce) {
  a.cert-card:hover,
  a.cert-card:focus-visible {
    transform: none;
  }
}

/* ========================================
   BRAND ICONS — inlined SVG
   Lucide 1.0 removed all trademarked brand icons (GitHub, LinkedIn,
   etc.), so these ship with the page instead of coming from a CDN.
   Unlike Lucide's stroke-based icons, brand marks are fill-based.
======================================== */
.brand-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
  stroke: none;
}

/* ========================================
   CERTIFICATE PREVIEW inside the detail modal
======================================== */
.detail-media {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.detail-caption {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Cert cards that open a document rather than linking out */
.cert-card.has-detail {
  cursor: pointer;
  flex-wrap: wrap;
}

.cert-card.has-detail .cert-verify {
  color: var(--accent2);
}

/* Two-line text badge (e.g. "120 HRS") */
.cert-badge.unam br + *,
.cert-badge.unam {
  line-height: 1.1;
}
