/* Overlay para menú hamburguesa */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 40, 60, 0.32);
  z-index: 9998;
  transition: opacity 0.18s;
  opacity: 0;
  pointer-events: none;
}
.menu-overlay.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
/* styles.css - Estilos simples y responsive para la SPA de currículum */
:root {
  --bg: #f4f8ff;
  --card: #f8fbff;
  --muted: #5e6b76;
  --accent: #0d6efd; /* primary blue */
  --accent-rgb: 13, 110, 253;
  --glass: rgba(13, 110, 253, 0.05);
  --max-width: 1000px;
  --radius: 10px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family:
    Inter,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: linear-gradient(180deg, var(--bg), #e9f3ff);
  color: #212529;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}
.site-header {
  background: transparent;
  padding: 14px 0;
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* barra destacada del proyecto Drone, debajo del menú principal */
.drone-banner {
  margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), #6ea8ff);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.25);
}
.drone-banner .container {
  padding-top: 9px;
  padding-bottom: 9px;
  display: flex;
  justify-content: center;
}
.drone-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none !important;
}
.drone-banner-link::before {
  content: "🚁";
  font-size: 1.05rem;
  line-height: 1;
}
.drone-banner-link:hover,
.drone-banner-link:focus,
.drone-banner-link:focus-visible {
  color: #fff !important;
  text-decoration: underline !important;
  outline: none;
}
@media (max-width: 480px) {
  .drone-banner-link {
    font-size: 0.85rem;
  }
}

/* Hamburguesa: oculto en desktop, visible en móvil */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  margin-right: 8px;
  cursor: pointer;
  color: var(--accent);
}
.menu-toggle svg {
  display: block;
}
.brand {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

/* logo inside brand */
.brand-logo,
.brand img {
  height: 40px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

/* language switcher */
.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 12px;
}
.lang-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}
.lang-btn img {
  width: 20px;
  height: 14px;
  display: block;
}
.lang-btn:hover,
.lang-btn:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.15);
  background: rgba(var(--accent-rgb), 0.03);
}
.lang-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.06);
}
/* enlaces normales (excluyendo botones que usan la clase .btn) */
nav a,
a:not(.btn) {
  color: var(--muted);
  margin-left: 14px;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

/* hover / focus: accent color */
nav a:hover,
a:not(.btn):hover,
nav a:focus,
a:not(.btn):focus,
nav a:focus-visible,
a:not(.btn):focus-visible {
  color: var(--accent);
  outline: none;
}
.loading {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}
.card {
  background: white;
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.08);
  margin-bottom: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.06);
}
.header {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #6ea8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}
/* imagen dentro del avatar (logo) */
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.h-name {
  font-size: 1.4rem;
  font-weight: 700;
}
.h-title {
  color: var(--muted);
  margin-top: 2px;
}
.section-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}
.meta {
  color: var(--muted);
  font-size: 0.9rem;
}
/* center location + contact button specifically on the About page */
.about-contact {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
}
.about-contact .btn {
  margin-left: 4px;
}
.about-contact .btn {
  color: #fff;
}
.about-contact .sep {
  color: var(--muted);
  margin: 0 6px;
}

/* social links (GitHub / LinkedIn) in About section */
.social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}
.social-links .social {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 60px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
}
.social-links svg {
  width: 20px;
  height: 20px;
  fill: var(--muted);
  transition:
    fill 140ms ease,
    transform 120ms ease;
}
.social-links .social-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  transition: color 140ms ease;
}
.social-links .social:hover svg,
.social-links .social:focus svg {
  fill: var(--accent);
  transform: translateY(-2px);
}
.social-links .social:hover .social-label,
.social-links .social:focus .social-label {
  color: var(--accent);
}
.grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    position: relative;
  }
  nav#main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    min-height: 100px;
    background: var(--card);
    box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.13);
    flex-direction: column;
    align-items: center;
    z-index: 100000;
    padding: 70px 0 18px 0;
    border-radius: 0 0 16px 16px;
    transition: opacity 0.18s;
    opacity: 0;
    pointer-events: none;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
  }
  nav#main-nav.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
  .menu-toggle {
    z-index: 100000;
    position: relative;
  }
  nav#main-nav a {
    margin: 10px 0;
    font-size: 1.15rem;
    width: 100%;
    text-align: center;
  }
}
.footer {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* site footer styling */
.site-footer {
  padding: 18px 0;
  background: transparent;
}
.site-footer .container {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #012;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
/* chips / etiquetas para skills y tecnologías */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chip {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* idiomas */
.languages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.language {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}
.language .name {
  font-weight: 600;
}
.language .level {
  color: var(--muted);
  font-size: 0.9rem;
}

/* mejoras en experiencia: detalles */
.exp-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}
.exp-tech {
  margin-top: 8px;
}
.cv-download-btn {
  display: block;
  margin: 32px auto 0 auto;
  text-align: center;
  background: var(--accent, #1976d2);
  color: #fff !important;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: 0 2px 8px 0 rgba(25, 118, 210, 0.1);
  transition: background 0.2s;
}
.cv-download-btn:hover,
.cv-download-btn:focus {
  background: #1251a3;
  color: #fff;
}

/* Cookie Banner GDPR */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(33, 37, 41, 0.98);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

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

.cookie-content p {
  margin: 0;
  flex: 1 1 300px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-accept {
  background: var(--accent);
  color: #fff;
}

.cookie-accept:hover,
.cookie-accept:focus {
  background: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.cookie-reject {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-reject:hover,
.cookie-reject:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-btn {
    flex: 1;
  }
}

/* Contact Form */
.contact-form {
  margin-top: 16px;
}

.contact-form + .section-title,
.section-title[style*="margin-top:24px"] {
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 200px;
  display: block;
  margin: 0 auto;
}

.submit-btn:hover:not(:disabled) {
  background: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.form-status.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-status.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
  .submit-btn {
    max-width: 100%;
  }
}

/* Sección Dron */
.drone-eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 4px;
}
.drone-subhead {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.status-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status-row {
  padding: 10px 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.status-row:first-child {
  border-top: none;
  padding-top: 0;
}
.status-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.status-name {
  font-weight: 600;
}
.status-pct {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.status-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  overflow: hidden;
  margin-bottom: 6px;
}
.status-fill {
  height: 100%;
  border-radius: 999px;
}
.status-note {
  color: var(--muted);
  font-size: 0.85rem;
}
.stl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.stl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.04);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  color: #212529 !important;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}
.stl-item:hover,
.stl-item:focus {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
}
.stl-item .stl-download {
  color: var(--accent);
  font-weight: 700;
  flex: none;
}

/* jump nav dentro de la sección Dron — estilo de pestañas */
.drone-jumpnav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: safe center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  gap: 2px;
  margin-top: 14px;
  padding-top: 0;
  border-bottom: 2px solid rgba(var(--accent-rgb), 0.12);
  scrollbar-width: thin;
}
.drone-jumpnav a {
  flex: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-left: 0 !important;
  margin-bottom: -2px;
  color: var(--muted);
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.drone-jumpnav a:hover,
.drone-jumpnav a:focus {
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
}
.drone-jumpnav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 640px) {
  .drone-jumpnav a {
    padding: 9px 11px;
    font-size: 0.78rem;
  }
}

/* cómo funciona: pasos numerados */
ol.drone-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
ol.drone-steps li {
  padding-left: 4px;
}

/* retos técnicos */
.challenge-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.challenge {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.035);
  border-left: 3px solid var(--accent);
}
.challenge-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.challenge p {
  margin: 6px 0;
  font-size: 0.92rem;
}
.challenge p:first-of-type {
  color: var(--muted);
}

/* hecho / pendiente bajo cada barra de estado */
.status-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  margin-top: 10px;
}
.status-split h5 {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
ul.status-done,
ul.status-todo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
ul.status-done li,
ul.status-todo li {
  font-size: 0.82rem;
  line-height: 1.45;
  padding-left: 17px;
  position: relative;
}
ul.status-done li {
  color: var(--text, inherit);
}
ul.status-todo li {
  color: var(--muted);
}
ul.status-done li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #198754;
  font-weight: 700;
}
ul.status-todo li::before {
  content: "○";
  position: absolute;
  left: 0;
  color: var(--muted);
}
p.status-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
@media (max-width: 640px) {
  .status-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* bloques de comandos / ficheros de configuración (sección RPi) */
pre.code-block {
  background: #1c2128;
  color: #d4d8e0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 4px 0 4px;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
pre.code-block code {
  font-family: inherit;
  background: none;
  color: inherit;
}

/* fin de styles.css */
