:root {
  --bg: #0b0f14;
  --card: #101923;
  --neon: #00d4ff;
  --text: #e6f1ff;
  --muted: #9fb6c6;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(circle at top right, #06121b, var(--bg) 70%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

header {
  margin-bottom: 3rem;
}

.profile-pic {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  border: 2px solid rgba(0, 212, 255, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.25);
  margin-bottom: 0.6rem;
}

p.subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  background: linear-gradient(90deg, var(--neon), #7be7ff);
  color: #00121a;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

footer a {
  color: var(--neon);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 500px) {
  h1 { font-size: 1.8rem; }
  p.subtitle { font-size: 0.95rem; }
}

/* Canvas de fondo dinámico */
#bg-canvas{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;          /* detrás del contenido */
  display: block;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(0,212,255,0.12), transparent 60%),
    radial-gradient(900px 600px at -20% 110%, rgba(0,212,255,0.08), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.45));
  z-index: -1;
}

/* --- Fade-in general de entrada --- */
body {
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.newsletter-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #0a0f1f;
  color: #fff;
  font-family: 'Inter', sans-serif;
}

.newsletter-page .container {
  max-width: 820px;        
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Newsletter: diseño en columna */
.newsletter-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem; /* espacio entre los elementos */
  margin-top: 1.5rem;
  width: 100%;
  max-width: 450px;
  margin-inline: auto;
}

/* Input centrado y ancho completo */
.newsletter-form input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #121a2f;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

/* Captcha centrado */
.newsletter-form .captcha {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Botón */
.newsletter-form button {
  background: linear-gradient(90deg, var(--neon), #7be7ff);
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  color: #00121a;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  font-size: 1rem;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

/* Texto pequeño */
.note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #9fb6c6;
}

/* Responsive: en móvil lo apilamos todo en una columna */
@media (max-width: 720px) {
  .newsletter-form {
    grid-template-columns: 1fr;
  }
  .newsletter-form button {
    width: 100%;
  }
  .newsletter-form .captcha {
    justify-content: center;
  }
}

.back {
  display: inline-block;
  margin-top: 1.5rem;
  color: #00d4ff;
  text-decoration: none;
  font-size: 0.9rem;
}

/* --- Página de noticias --- */
.news-page {
  background: radial-gradient(circle at top right, #06121b, #0b0f14 70%);
  color: var(--text);
  font-family: Inter, sans-serif;
  padding: 2rem 1rem 4rem;
  text-align: center;
}

.header-news h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.header-news .subtitle {
  color: var(--muted);
  margin-bottom: 3rem;
}

/* News: layout base */
.news-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;               
}

.news-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.25);
}

.news-date {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
}

.news-title {
  color: var(--text);
  font-size: 1.2rem;
  margin: 0.3rem 0 0.6rem;
}

.news-summary {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.btn-news {
  display: inline-block;
  color: #00121a;
  background: linear-gradient(90deg, var(--neon), #7be7ff);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-news:hover {
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.footer-news {
  margin-top: 3rem;
}

.footer-news .back {
  color: var(--neon);
  text-decoration: none;
  font-size: 0.9rem;
}

/* ====== Vista móvil ====== */
@media (max-width: 640px){
  /* reduce padding global de la página de noticias */
  .news-page{
    padding: 1.5rem .75rem 3rem;
  }

  /* una sola columna sin mínimo que rompa */
  .news-container{
    grid-template-columns: 1fr;  /* 👈 clave */
    gap: 1rem;
    padding: 0;                  /* el padding lo pone .news-page */
    max-width: 100%;
  }

  .news-card{
    margin: 0;                   /* evita sumar márgenes laterales */
    border-radius: 12px;
    transform: none;             /* sin “saltitos” en touch */
  }

  .btn-news{
    width: 100%;                 /* botón cómodo a una mano */
    text-align: center;
  }
}

@media (min-width: 641px){
  .news-container{
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* 260 en vez de 280 */
  }
}

/* --- Página de Glosario --- */
.glossary-page {
  background: radial-gradient(circle at top right, #06121b, #0b0f14 70%);
  color: var(--text);
  font-family: Inter, sans-serif;
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

.glossary-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.glossary-hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  margin: 0 0 0.5rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.glossary-hero .subtitle {
  color: var(--muted);
  margin: 0 auto 1.2rem;
  max-width: 680px;
}

.glossary-search {
  display: flex;
  justify-content: center;
  margin: 0.5rem auto 2rem;
}
.glossary-search input {
  width: 100%;
  max-width: 520px;
  background: #07121a;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
}

.glossary-container {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.glossary-item {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 12px;
  padding: 1.5rem 1rem 1.2rem; /* ↓ menos padding superior */
  padding-top: 2.2rem; /* espacio justo debajo del badge */
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.glossary-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 16px rgba(0,212,255,0.25);
  border-color: rgba(0,212,255,0.28);
}

/* --- Títulos centrados y equilibrados --- */
.g-term {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.6rem 0 0.35rem; /* ajusta espacio entre badge y texto */
  text-align: center;
}

.g-def {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
  margin: 0;
}

/* --- Nueva barra luminosa superior (badge) --- */
.badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--neon), #7be7ff);
  color: #00121a;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,212,255,0.3);
}

.badge.base{background:linear-gradient(90deg,#00d4ff,#7be7ff);box-shadow:0 2px 8px rgba(0,212,255,.35)}
.badge.amenaza{background:linear-gradient(90deg,#ff004c,#ff6b81);box-shadow:0 2px 8px rgba(255,0,76,.35)}
.badge.tecnicas{background:linear-gradient(90deg,#3b82f6,#60a5fa);box-shadow:0 2px 8px rgba(59,130,246,.35)}
.badge.buenas-practicas{background:linear-gradient(90deg,#00ff9d,#6effc1);box-shadow:0 2px 8px rgba(0,255,157,.35)}



/* ====== Vista móvil /glossary ====== */
@media (max-width: 640px){
  /* Padding más compacto en la página */
  .glossary-page{
    padding: 1.5rem .75rem 3rem;
  }

  /* Hero y buscador a ancho completo */
  .glossary-hero .subtitle{ padding: 0 .25rem; }
  .glossary-search{ margin: .75rem auto 1.25rem; }
  .glossary-search input{
    max-width: 100%;
    width: 100%;
  }

  /* 1 sola columna fluida (sin minmax que rompa) */
  .glossary-container{
    grid-template-columns: 1fr;   /* 👈 clave */
    gap: 1rem;
    max-width: 100%;
  }

  /* Tarjeta: ancho completo y sin “saltitos” */
  .glossary-item{
    width: 100%;
    padding: 2.2rem 1rem 1.2rem;  /* hueco para la barra/badge */
    transform: none;
    margin: 0;
  }

  /* Título centrado y con aire bajo la barra */
  .g-term{
    text-align: center;
    margin: .6rem 0 .4rem;
  }

  /* La barra (badge) ocupa el ancho de la card sin desbordes */
  .badge{
    left: 0;
    right: 0;
    width: 100%;
  }
}

.footer-glossary {
  margin-top: 2.2rem;
  text-align: center;
}
.footer-glossary .back {
  color: var(--neon);
  text-decoration: none;
  font-size: .95rem;
}

/* --- Página "Sobre mí" --- */
.about-page {
  background: radial-gradient(circle at top right, #06121b, #0b0f14 70%);
  color: var(--text);
  font-family: Inter, sans-serif;
  padding: 2rem 1rem 4rem;
  min-height: 100vh;
}

.about-header {
  text-align: center;
  margin-bottom: 2rem;
}

.about-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.about-header .subtitle {
  color: var(--muted);
  font-size: 1rem;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-bio {
  display: flex;
  flex-direction: column; /* ← apila imagen y texto */
  align-items: center;    /* ← centra horizontalmente */
  text-align: center;     /* ← centra el texto */
  gap: 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 12px;
  padding: 2rem;
}

.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neon);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.about-text h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.about-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.about-goal, .about-contact {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

.about-goal h2, .about-contact h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.about-goal p, .about-contact p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.about-contact a {
  color: var(--neon);
  text-decoration: none;
}
.about-contact a:hover {
  text-decoration: underline;
}

.footer-about {
  margin-top: 3rem;
  text-align: center;
}

.footer-about .back {
  color: var(--neon);
  text-decoration: none;
  font-size: 0.9rem;
}

/* ===== Página de detalle de noticia ===== */
.news-article {
  background: radial-gradient(circle at top right, #06121b, #0b0f14 70%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  padding: 2rem 1rem 4rem;
}

/* Contenedor del artículo */
.news-article .post {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 14px;
  padding: 2rem 2.2rem;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.05);
  text-align: left;                /* ← anula el centrado global del listado */
}

/* Meta fecha/categoría */
.news-article .post .news-date {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  text-align: center;
}

/* Título y entradilla */
.news-article .post h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  margin: 0 0 0.8rem;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}
.news-article .post .lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 auto 1.8rem;
  max-width: 70ch;
  text-align: center;
}

/* Subtítulos y texto */
.news-article .post h2 {
  color: var(--neon);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.6rem;
}
.news-article .post p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Listas bien alineadas a la izquierda */
.news-article .post ul {
  list-style: disc;
  margin: 0.4rem 0 1.5rem 1.2rem;
  padding-left: 0.8rem;
}
.news-article .post li {
  margin: 0.35rem 0;
}

/* Enlaces y botón volver */
.news-article .post a { color: var(--neon); text-decoration: none; }
.news-article .post a:hover { text-decoration: underline; }
.news-article .post .back {
  display: inline-block;
  margin-top: 1.8rem;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
  .news-article { padding: 1.5rem .75rem 3rem; }
  .news-article .post { padding: 1.25rem 1rem; border-radius: 10px; }
  .news-article .post h1 { font-size: 1.6rem; }
  .news-article .post h2 { font-size: 1.1rem; }
}

