/* ============================================================
   NEXUS — Centro de Investigación IA & Blockchain
   styles.css
   ============================================================ */

/* ─── VARIABLES ─── */
:root {
  --bg:           #F8FAFC;
  --surface:      #FFFFFF;
  --surface2:     #ECFEFF;
  --border:       #D4E8EB;
  --accent:       #1FC2D1;
  --accent2:      #1FB0C6;
  --accent-light: #15889A;
  --text:         #0F172A;
  --muted:        #475569;
  --ink:          rgba(10, 56, 89, 0.6);
  --primary:      #1FC2D1;
  --secondary:    #1FB0C6;
  --cta:          #FF8C1A;
  --cta-alt:      #C24E00;
}


/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  overflow-x: hidden;
}

/* ─── PAGES ─── */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(245,243,238,0.92);
  backdrop-filter: blur(16px);
}

.nav-logo {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  cursor: pointer;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.3rem;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); background: var(--accent-light); }

.nav-cta {
  padding: 0.5rem 1.3rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--accent); color: #fff; }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  padding: 0.8rem 4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: var(--surface);
}
.breadcrumb span { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }

/* ─── PAGE HEADER BAND ─── */
.page-header {
  background: rgba(10, 56, 89, 0.5);
  padding: 4rem 4rem 3.5rem;
  position: relative;
  overflow: hidden;

}
.page-header-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.page-header-tag::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.page-header h1 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  color: #fff;
  line-height: 1.05;
  max-width: 700px;
}
.page-header h1 em {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  color: var(--accent);
}
.page-header p {
  margin-top: 1.2rem;
  max-width: 520px;
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.5);
}

/* ─── CONTENT WRAPPER ─── */
.content      { padding: 4rem; max-width: 1400px; margin: 0 auto; }
.content-wide { padding: 4rem; }

/* ─── SECTION TAG ─── */
.section-tag {
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.section-tag::before { content: ''; width: 20px; height: 1px; background: var(--accent); }

h2 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 1rem;
}
h2 em {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  color: var(--accent);
}

/* ─── BUTTONS ─── */
.btn-primary {
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  padding: 0.85rem 2rem;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

/* ─── FOOTER ─── */
footer {
  border-top: 2px solid var(--border);
  padding: 2.2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}
.footer-logo {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: 0.08em;
}
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.67rem; color: var(--muted); }
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a {
  font-size: 0.67rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ─── SCROLL ANIMATIONS ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   HOME PAGE
   ============================================================ */

/* Hero */
.home-hero {
  background: var(--ink);
  padding: 7rem 4rem 5rem;
  position: relative;
  overflow: hidden;
  display:grid;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.orb1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.9) 0%, transparent 70%);
  top: -80px; right: -60px;
  animation: drift1 12s ease-in-out infinite alternate;
}
.orb2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  bottom: 30px; left: 80px;
  animation: drift2 15s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(-30px,50px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(25px,-35px); } }

.hero-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}
.hero-tag::before { content: ''; width: 28px; height: 1px; background: var(--accent); }

.home-hero h1 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.0;
  color: #fff;
  max-width: 780px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.home-hero h1 em {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  color: var(--accent);
}

.hero-desc {
  max-width: 460px;
  font-size: 0.88rem;
  line-height: 1.95;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2.8rem;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Stats bar */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  gap: 4rem;
  align-items: center;
}
.stat { text-align: left; }
.stat-num {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--ink);
  display: block;
}
.stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats-bar-divider { width: 1px; height: 40px; background: var(--border); }

/* Home two-col intro */
.home-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.home-intro-text {
  padding: 4rem;
  border-right: 1px solid var(--border);
}
.home-intro-text p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.95;
  margin-bottom: 1.2rem;
}
.home-intro-links { padding: 4rem; background: var(--surface2); }
.intro-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.2s;
}
.intro-link-item:last-child { border-bottom: none; }
.intro-link-item:hover { color: var(--accent); }
.intro-link-title {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.intro-link-arrow { font-size: 1rem; opacity: 0.5; }

/* Latest highlights */
.home-highlights { padding: 4rem; background: var(--bg); }
.highlights-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s;
  cursor: pointer;
}
.highlight-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.highlight-card.featured { background: var(--accent); }
.highlight-card.featured .highlight-tag,
.highlight-card.featured .highlight-title,
.highlight-card.featured .highlight-desc { color: #fff; }
.highlight-card.featured .highlight-meta { color: rgba(255,255,255,0.6); }
.highlight-tag {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.highlight-card.featured .highlight-tag { color: rgba(255,255,255,0.7); }
.highlight-title {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}
.highlight-desc { font-size: 0.78rem; line-height: 1.8; color: var(--muted); }
.highlight-meta { font-size: 0.62rem; color: var(--muted); margin-top: 1.5rem; letter-spacing: 0.08em; }

/* ============================================================
   RESEARCH PAGE
   ============================================================ */
.research-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - 120px);
}
.research-sidebar {
  border-right: 1px solid var(--border);
  padding: 2.5rem 2rem;
  background: var(--surface);
  position: sticky;
  top: 57px;
  height: fit-content;
}
.sidebar-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.sidebar-filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.55rem 0.8rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  background: none;
  border: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.05em;
}
.filter-btn:hover,
.filter-btn.active { background: var(--accent-light); color: var(--accent); }

.research-main { padding: 3rem 4rem; }
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.research-card {
  background: var(--surface);
  padding: 2.5rem;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}
.research-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}
.research-card:hover::before { transform: scaleX(1); }
.research-card:hover { background: var(--accent-light); }

.card-num {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.8rem;
  font-style: italic;
}
.card-icon { font-size: 1.8rem; margin-bottom: 1.1rem; }
.card-title {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
}
.card-desc { font-size: 0.78rem; line-height: 1.9; color: var(--muted); }

/* Papers table */
.papers-section { padding: 3rem 4rem; border-top: 1px solid var(--border); }
.papers-table { width: 100%; border-collapse: collapse; margin-top: 2rem; }
.papers-table th {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border);
  background: var(--surface2);
}
.papers-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  vertical-align: top;
}
.papers-table tr:hover td { background: var(--accent-light); }
.paper-title {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}
.paper-title:hover { color: var(--accent); }
.paper-authors { color: var(--muted); font-size: 0.72rem; margin-top: 0.3rem; }
.paper-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.paper-year { color: var(--muted); font-size: 0.75rem; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.about-left  { padding: 4rem; border-right: 1px solid var(--border); }
.about-right { padding: 4rem; background: var(--surface); }
.about-left p,
.about-right p { color: var(--muted); font-size: 0.88rem; line-height: 1.95; margin-bottom: 1.2rem; }

.about-pillars { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.pillar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s;
}
.pillar:hover { border-color: var(--accent); }
.pillar-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }

/* Hex visual */
.about-visual { position: relative; height: 420px; margin: 3rem 4rem; }
.about-box { position: absolute; border: 1px solid var(--border); background: var(--surface); }
.about-box-main {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hex-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 2rem; }
.hex-dot {
  width: 8px; height: 8px;
  background: var(--border);
  border-radius: 50%;
  animation: pulse-dot 4s ease-in-out infinite;
}
.hex-dot:nth-child(3n) { background: rgba(37,99,235,0.35); animation-delay: 0.5s; }
.hex-dot:nth-child(5n) { background: rgba(124,58,237,0.25); animation-delay: 1s; }
@keyframes pulse-dot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.35); }
}
.about-box-accent {
  width: 140px; height: 75px;
  bottom: -16px; right: -16px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.about-box-accent span:first-child {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
}
.about-box-accent span:last-child {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}

/* Timeline */
.timeline { padding: 4rem; border-top: 1px solid var(--border); }
.timeline-items { margin-top: 2.5rem; position: relative; padding-left: 2rem; }
.timeline-items::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item { padding-bottom: 2.5rem; position: relative; padding-left: 2rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 4px;
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
}
.timeline-year { font-size: 0.62rem; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.4rem; font-style: italic; }
.timeline-title { font-family: 'Syne', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-bottom: 0.4rem; }
.timeline-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.8; }

/* ============================================================
   TEAM PAGE
   ============================================================ */
.team-grid{
  display: grid;
  grid-template-columns: auto auto auto auto ;
  border: solid 1px var(--border);
  border-radius: 2%;
}

.team-card{
  padding: 50px 10px 50px 10px;
  width: 100%;
  height: 100%;
  background: var(--surface);
  text-align: center;
  border-radius: 2%;
  border:solid 1px var(--border);
  position:relative;
  transition:ease-in-out 0.3s;
}
.team-card:hover{
  border-color: var(--accent);
  transform: translateY(-5px);
}



/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  border-top: 1px solid var(--border);
}
.contact-left {
  padding: 4rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.contact-left p { color: var(--muted); font-size: 0.88rem; line-height: 1.95; margin-bottom: 2.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.8rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.contact-link:hover { border-color: var(--accent); background: var(--accent-light); }
.contact-link-icon {
  width: 36px; height: 36px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.contact-right { padding: 4rem; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.82rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }
.form-submit {
  padding: 1rem;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.form-submit:hover { opacity: 0.87; }

/* Map placeholder */
.contact-map {
  margin: 0 4rem 4rem;
  height: 220px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.contact-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.12) 1px, transparent 1px);
  background-size: 30px 30px;
}
.map-pin {
  position: relative;
  z-index: 1;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  nav, .breadcrumb { padding: 1rem 2rem; }
  .home-hero, .content, .content-wide, .page-header { padding-left: 2rem; padding-right: 2rem; }
  .stats-bar { padding: 2rem; gap: 2rem; flex-wrap: wrap; }
  .home-intro, .about-layout, .contact-layout { grid-template-columns: 1fr; }
  .home-intro-text { border-right: none; border-bottom: 1px solid var(--border); }
  .research-layout { grid-template-columns: 1fr; }
  .research-sidebar { position: static; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .team-extended { grid-template-columns: 1fr 1fr; }
  .team-join { flex-direction: column; margin: 2rem; padding: 2.5rem; }
  .contact-left { border-right: none; border-bottom: 1px solid var(--border); }
  .contact-map { margin: 0 2rem 2rem; }
  .about-visual { margin: 2rem; }
  .papers-section, .timeline, .home-highlights { padding: 2rem; }
  .research-main { padding: 2rem; }
  footer { padding: 2rem; }
  .highlights-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .research-grid, .team-grid, .team-extended, .highlights-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1.2rem; text-align: center; }
  .stats-bar { gap: 1.5rem; }
  .stats-bar-divider { display: none; }
}


.avatar{
  width: 70px;
  height: 70px;
  border-radius: 50%;
}

a{
  text-decoration: none;

}

.contenedor-video{
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;

}


.video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.video.active {
  opacity: 1;
}

/* Oscurecer fondo */
.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: -1;
}

.carta-carrusel{
  grid-row:1;
  width: 400px;
  height: 500px;
  background-color: #0F172A;
  position:relative;
  left:100px;
  border-radius: 5%;
} 


.carta-carrusel img {
  width: 100%;
  height:100%;
   border-radius: 5%;
  object-fit: cover;
  position: absolute;
  opacity: 0;
  transition: opacity 1s ease;
}

.carta-carrusel img.active {
  opacity: 1;
}



.hero-caja{
  grid-row:1;
}

/* ===== INTRO ANIMATION ===== */
body.preload {
  overflow: hidden;
}

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0, 0, 0);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.intro-content {
  text-align: center;
  animation: introZoom 1.2s ease;
}

.intro-line {
  width: 70px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 1.2rem;
  animation: introLine 0.8s ease;
}

.intro-brand {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 0.8rem;
}

.intro-brand span {
  color: var(--accent);
}

.intro-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

@keyframes introZoom {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(18px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes introLine {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* ── Intro Loader ── */
.intro-loader {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.intro-content {
  width: clamp(320px, 60vw, 700px);
  padding: 60px 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
/* ── Scene ── */
.scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: pointer;
}
 
/* ── Logo ── */
.logo {
  display: flex;
  align-items: baseline;
  opacity: 0;
  transform: translateY(20px);
  animation: riseIn 0.9s cubic-bezier(.22, 1, .36, 1) 0.3s forwards;
}
 
.logo span {
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}
 
.teal { color: #4ecdc4; }
.gold { color: #04696d; }
 
/* ── Underline bar ── */
.bar-wrap {
  width: 100%;
  height: 2px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.1s 1.1s forwards;
}
 
.bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #4ecdc4 60%, #c9a227 100%);
  transform: scaleX(0);
  transform-origin: left;
  animation: barGrow 0.8s cubic-bezier(.22, 1, .36, 1) 1.15s forwards;
}
 
.dot-left,
.dot-right {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%) scale(0);
}
 
.dot-left {
  left: -3px;
  background: #4ecdc4;
  animation:
    dotPop 0.4s cubic-bezier(.34, 1.56, .64, 1) 1.9s forwards,
    blink   2.4s 2.3s infinite;
}
 
.dot-right {
  right: -3px;
  background: #c9a227;
  animation:
    dotPop 0.4s cubic-bezier(.34, 1.56, .64, 1) 2.0s forwards,
    blink   2.4s 2.4s infinite;
}
 
/* ── Tagline ── */
.tagline {
  font-size: clamp(10px, 1.8vw, 13px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #4ecdc4;
  opacity: 0;
  animation: fadeIn 0.8s ease 2.2s forwards;
}
 
/* ── Background nodes ── */
.nodes {
  position: absolute;
  inset: -120px;
  pointer-events: none;
}
 
.node {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
}
 
.node:nth-child(1) { width: 6px; height: 6px; background: #4ecdc4; top: 18%;    left: 8%;   animation: nodePulse 3s   2.5s infinite; }
.node:nth-child(2) { width: 4px; height: 4px; background: #c9a227; top: 30%;    right: 10%; animation: nodePulse 3.4s 2.8s infinite; }
.node:nth-child(3) { width: 5px; height: 5px; background: #4ecdc4; bottom: 22%; left: 14%;  animation: nodePulse 2.8s 3.1s infinite; }
.node:nth-child(4) { width: 4px; height: 4px; background: #c9a227; bottom: 18%; right: 8%;  animation: nodePulse 3.2s 2.6s infinite; }
.node:nth-child(5) { width: 3px; height: 3px; background: #4ecdc4; top: 10%;    left: 42%;  animation: nodePulse 4s   3.4s infinite; }
 
.line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: fadeIn 0.8s ease 3s forwards;
}
 
/* ── Keyframes ── */
@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}
 
@keyframes fadeIn {
  to { opacity: 1; }
}
 
@keyframes barGrow {
  to { transform: scaleX(1); }
}
 
@keyframes dotPop {
  to { transform: translateY(-50%) scale(1); }
}
 
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}
 
@keyframes nodePulse {
  0%        { opacity: 0;   transform: scale(0.6); }
  30%       { opacity: 0.7; transform: scale(1.2); }
  60%, 100% { opacity: 0.3; transform: scale(1);   }
}

