@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&family=Orbitron:wght@400;700;900&display=swap');

/* ═══════════════════════════════════════════════
   VARIABLES & RESET
═══════════════════════════════════════════════ */
:root {
  --bg:         #030712;
  --bg2:        #0d1526;
  --bg-card:    rgba(13, 21, 38, 0.85);
  --purple:     #7c3aed;
  --cyan:       #06b6d4;
  --gold:       #f59e0b;
  --txt:        #f1f5f9;
  --txt2:       #94a3b8;
  --border:     rgba(124, 58, 237, 0.22);
  --border2:    rgba(6, 182, 212, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  text-decoration: none;
}

*::selection { background: var(--purple); color: #fff; }

html { overflow-x: hidden; scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 15% 40%, rgba(124,58,237,.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(6,182,212,.05) 0%, transparent 50%);
}

/* Estrellas de fondo (CSS puro) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at  8% 12%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 48%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 38%  7%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 52% 73%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 67% 28%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 79% 58%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 91% 82%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 14% 87%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 33% 63%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 58% 92%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(2px 2px at  4% 33%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 45% 22%, rgba(200,220,255,.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 73% 77%, rgba(200,220,255,.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 88%  9%, rgba(255,255,255,.5) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════
   NAVEGACIÓN
═══════════════════════════════════════════════ */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 5%;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo-img {
  height: 38px;
  filter: brightness(1.4);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.2rem;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--txt2);
  padding: 0.38rem 0.7rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  border-color: var(--border2);
  background: rgba(6,182,212,.08);
}

.nav-toggle {
  display: none;
  background: none;
  color: var(--txt);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   BANNER DE PÁGINA INTERIOR
═══════════════════════════════════════════════ */
.page-banner {
  padding: 6rem 8% 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(124,58,237,.06) 0%, transparent 100%);
}

.page-banner-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.page-banner-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--txt);
  text-shadow: 0 0 30px rgba(124,58,237,.4);
  margin-bottom: 0.75rem;
}

.page-banner-subtitle {
  font-size: .95rem;
  color: var(--txt2);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════
   SECCIONES ALTERNAS (imagen + texto)
═══════════════════════════════════════════════ */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  position: relative;
  z-index: 1;
}

.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }

.split-img {
  overflow: hidden;
  position: relative;
}

.split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.split-section:hover .split-img img { transform: scale(1.04); }

.split-text {
  background: var(--bg2);
  padding: 3.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  border-left: 1px solid var(--border);
}

.split-section.reverse .split-text { border-left: none; border-right: 1px solid var(--border); }

.split-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.split-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}

.split-body {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--txt2);
}

/* ═══════════════════════════════════════════════
   SECCIÓN GENÉRICA (sin imagen)
═══════════════════════════════════════════════ */
.section {
  padding: 4rem 8%;
  position: relative;
  z-index: 1;
}

.section-dark { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--txt);
  margin-bottom: .75rem;
}

.section-subtitle {
  font-size: .9rem;
  color: var(--txt2);
  line-height: 1.65;
  max-width: 650px;
  margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════
   CARDS GRID (conocimientos, etc.)
═══════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: 0 8px 32px rgba(6,182,212,.1);
}

.card-img-wrap { height: 200px; overflow: hidden; }

.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.card:hover .card-img { transform: scale(1.05); }

.card-body { padding: 1.5rem; }

.card-icon { font-size: 1.3rem; color: var(--cyan); margin-bottom: .6rem; }

.card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: .6rem;
  line-height: 1.3;
}

.card-text { font-size: .85rem; line-height: 1.75; color: var(--txt2); }

/* ═══════════════════════════════════════════════
   PERFIL DE COLABORADORES
═══════════════════════════════════════════════ */
.profile-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-section {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 380px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.profile-section.reverse { grid-template-columns: 1fr 340px; }
.profile-section.reverse .profile-img-wrap { order: 2; }
.profile-section.reverse .profile-info { order: 1; }

.profile-img-wrap {
  overflow: hidden;
  background: var(--bg2);
}

.profile-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(20%);
  transition: filter .3s, transform .4s;
}

.profile-section:hover .profile-img { filter: grayscale(0); transform: scale(1.03); }

.profile-info {
  background: var(--bg2);
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  border-left: 1px solid var(--border);
}

.profile-section.reverse .profile-info { border-left: none; border-right: 1px solid var(--border); }

.profile-role {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.profile-name {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}

.profile-bio {
  font-size: .85rem;
  line-height: 1.8;
  color: var(--txt2);
}

/* ═══════════════════════════════════════════════
   LISTA DE ARTÍCULOS
═══════════════════════════════════════════════ */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(6px);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.article-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(6,182,212,.08);
  transform: translateX(4px);
}

.article-code {
  font-family: 'Orbitron', sans-serif;
  font-size: .65rem;
  letter-spacing: .08em;
  color: var(--purple);
  margin-bottom: .4rem;
}

.article-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.4;
  display: block;
  margin-bottom: .35rem;
  transition: color .2s;
}

.article-title:hover { color: #fff; }

.article-authors {
  font-size: .78rem;
  color: var(--txt2);
  font-style: italic;
}

/* ═══════════════════════════════════════════════
   DOCUMENTOS / LINKS
═══════════════════════════════════════════════ */
.docs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.docs-list li a {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  color: var(--txt2);
  padding: .6rem .9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,.02);
  transition: color .2s, border-color .2s, background .2s;
}

.docs-list li a::before { content: '↗'; color: var(--cyan); font-size: .8rem; flex-shrink: 0; }
.docs-list li a:hover { color: var(--txt); border-color: var(--border2); background: rgba(6,182,212,.05); }

/* ═══════════════════════════════════════════════
   BOTONES
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .65rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #5b21b6);
  color: #fff;
  border: 1px solid rgba(124,58,237,.4);
  box-shadow: 0 0 16px rgba(124,58,237,.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 28px rgba(124,58,237,.45); }

.btn-outline {
  background: transparent;
  color: var(--txt2);
  border: 1px solid var(--border);
}
.btn-outline:hover { color: var(--cyan); border-color: var(--border2); background: rgba(6,182,212,.06); }

/* ═══════════════════════════════════════════════
   NOSOTROS — SECCIONES DE TEXTO
═══════════════════════════════════════════════ */
.prose-section {
  padding: 4rem 8%;
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.prose-section p {
  font-size: .95rem;
  line-height: 1.9;
  color: var(--txt2);
  margin-bottom: 1rem;
}

.prose-section p:last-child { margin-bottom: 0; }

.prose-section strong, .prose-section b { color: var(--txt); }

.full-section {
  padding: 4rem 8%;
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.full-section p {
  font-size: .95rem;
  line-height: 1.9;
  color: var(--txt2);
  max-width: 820px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.main-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 8% 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: .85rem;
}

.footer-text {
  font-size: .82rem;
  color: var(--txt2);
  line-height: 1.7;
  margin-bottom: .3rem;
}

.footer-logo { height: 44px; margin-top: .85rem; filter: brightness(1.4) saturate(.6); }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.footer-links a { font-size: .82rem; color: var(--txt2); transition: color .2s; }
.footer-links a:hover { color: var(--cyan); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
  font-size: .75rem;
  color: var(--txt2);
  opacity: .65;
}

/* ═══════════════════════════════════════════════
   IMAGEN BANNER DECORATIVA (para nosotros)
═══════════════════════════════════════════════ */
.img-banner {
  height: 380px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.img-banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.55);
}

.img-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 8%;
}

.img-banner-quote {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0,0,0,.8);
  max-width: 700px;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 960px) {
  .split-section,
  .profile-section,
  .profile-section.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .split-section .split-img,
  .profile-section .profile-img-wrap {
    height: 280px;
  }

  .split-text,
  .profile-info {
    padding: 2rem 1.5rem;
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid var(--border);
  }

  .profile-section.reverse .profile-img-wrap { order: 0; }
  .profile-section.reverse .profile-info { order: 0; }

  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 58px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(3,7,18,.98);
    padding: .75rem;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .page-banner { padding: 5.5rem 6% 2.5rem; }
  .section, .full-section, .prose-section { padding: 2.5rem 6%; }
  .split-text, .profile-info { padding: 1.75rem 1.25rem; }
  .footer-content { grid-template-columns: 1fr; gap: 1.75rem; }
}
