/* ============================================================
   style.css — Estilos globales del Portafolio Profesional
   Tomás Hernández — Cloud · Ciberseguridad · Full-Stack
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Mono:wght@400;500&display=swap');

/* ---------- Variables ---------- */
:root {
  --bg:          #0e0e0e;
  --bg2:         #141414;
  --bg3:         #1a1a1a;
  --border:      #2a2a2a;
  --text:        #e8e8e8;
  --text-muted:  #777;
  --text-dim:    #aaa;
  --accent:      #4ade80;
  --accent-hover: #22c55e;
  --radius:      10px;

  /* Colores para badges de certificaciones */
  --badge-aws:      #FF9900;
  --badge-cisco:    #1BA0D7;
  --badge-comptia:  #C8202F;
  --badge-isc2:     #4B0082;
  --badge-itil:     #5B9A48;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: auto; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
p { text-align: justify; }

/* ---------- Navegación ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-brand { font-weight: 600; font-size: 14px; flex-shrink: 0; }
.nav-links { display: flex; gap: 28px; flex: 1; justify-content: center; }
.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ---------- Botones ---------- */
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover { border-color: #555; background: rgba(255,255,255,0.03); }

/* Botón CV destacado */
.btn-cv-large {
  padding: 14px 28px;
  font-size: 14px;
}

/* ---------- Sections ---------- */
.section-wrap {
  border-top: 1px solid var(--border);
  padding: 80px 48px;
}
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 48px;
}

/* ---------- Cards genéricas ---------- */
.card {
  background: #161616;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: #3a3a3a; transform: translateY(-2px); }

/* ---------- Tags ---------- */
.tag {
  font-size: 11px;
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 5px;
  padding: 3px 10px;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  display: inline-block;
  transition: border-color 0.2s;
}
.tag:hover { border-color: #444; }

/* ---------- Certificaciones mejoradas ---------- */
.cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid var(--border);
  background: #161616;
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.cert-item:hover { border-color: #3a3a3a; background: #1a1a1a; }

.cert-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Badges de colores por emisor */
.cert-badge-aws,
.cert-badge-cisco,
.cert-badge-comptia,
.cert-badge-isc2,
.cert-badge-itil {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cert-badge-aws {
  background: rgba(255, 153, 0, 0.15);
  color: var(--badge-aws);
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.cert-badge-cisco {
  background: rgba(27, 160, 215, 0.15);
  color: var(--badge-cisco);
  border: 1px solid rgba(27, 160, 215, 0.3);
}

.cert-badge-comptia {
  background: rgba(200, 32, 47, 0.15);
  color: var(--badge-comptia);
  border: 1px solid rgba(200, 32, 47, 0.3);
}

.cert-badge-isc2 {
  background: rgba(75, 0, 130, 0.25);
  color: #9966cc;
  border: 1px solid rgba(75, 0, 130, 0.4);
}

.cert-badge-itil {
  background: rgba(91, 154, 72, 0.15);
  color: var(--badge-itil);
  border: 1px solid rgba(91, 154, 72, 0.3);
}

.cert-name { font-size: 14px; font-weight: 600; }
.cert-org { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.cert-verify {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cert-verify:hover {
  color: var(--accent);
}

/* ---------- Proyectos mejorados ---------- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card-header { margin-bottom: 16px; }

.project-card-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.status-completed {
  background: rgba(74, 222, 128, 0.15);
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-dev {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-collab {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.project-card-name { font-size: 15px; font-weight: 600; margin-bottom: 12px; }

.project-card-body {
  flex: 1;
  margin-bottom: 16px;
}

.project-card-body p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.6;
}

.project-what strong,
.project-problem strong {
  color: var(--text);
  font-weight: 500;
}

.project-desc-short {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.project-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.btn-project:hover:not(:disabled) {
  border-color: #444;
  background: #252525;
}

.btn-project svg {
  opacity: 0.7;
}

.btn-project.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

/* ---------- Formulario de contacto ---------- */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  background: #161616;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 32px;
  text-align: left;
}

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

.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #444;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #555;
}

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

/* ---------- Footer mejorado ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  background: #0c0c0c;
}

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

.footer p {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

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

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

/* ---------- Contacto cards ---------- */
.contact-cards { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.2s;
  min-width: 200px;
}
.contact-card:hover { border-color: #444; }
.contact-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #1e1e1e;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.contact-card-label { font-size: 11px; color: var(--text-muted); }
.contact-card-value { font-size: 13px; margin-top: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav-brand { font-size: 15px; }
  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    font-size: 12px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .section-wrap { padding: 60px 20px; }

  .cert-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cert-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .project-actions {
    flex-direction: column;
  }

  .btn-project {
    justify-content: center;
  }

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

  .contact-form {
    padding: 24px 20px;
  }
}

/* Parallax shared styles (used by hero and page-hero) */
.parallax-layer{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: translate3d(0,0,0);
  will-change: transform;
  z-index: 0;
}
.parallax-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45));
  z-index: 1;
}
.page-hero, .hero-img-wrap { position: relative; overflow: hidden; }
.page-hero > *, .hero-content { position: relative; z-index: 2; }

@media (pointer: coarse) {
  .parallax-layer { display: none; }
}

/* Animación de pulso para el badge de disponibilidad */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* ---------- Navegación secundaria (Exploración temática) ---------- */
.sub-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
  padding: 20px 48px;
}

.sub-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 32px;
}

.sub-nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.sub-nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.sub-nav-links a {
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.2s;
  position: relative;
}

.sub-nav-links a:hover {
  color: var(--text);
}

.sub-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s;
}

.sub-nav-links a:hover::after {
  width: 100%;
}

/* ---------- Visión sobre IA ---------- */
.vision-ia {
  margin-top: 32px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.05) 0%, rgba(74, 222, 128, 0.02) 100%);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
}

.vision-ia h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vision-ia h3::before {
  content: '◆';
  color: var(--accent);
  font-size: 10px;
}

.vision-ia p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  text-align: justify;
  margin: 0;
}

.bio-career {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin-top: 16px;
}

/* Responsive para sub-nav y vision-ia */
@media (max-width: 768px) {
  .sub-nav {
    padding: 16px 20px;
  }

  .sub-nav-inner {
    flex-direction: column;
    gap: 12px;
  }

  .sub-nav-links {
    gap: 16px;
  }

  .vision-ia {
    padding: 20px;
    margin-top: 24px;
  }
}
