/* 
===================================================================================================
                  NEXUS — Semillero de Programación Competitiva
                              Jerson Chaguala
===================================================================================================
*/

:root {
  --verde: #369E4A;
  --verde-dark: #1a4d27;
  --verde-light: #4dbe62;
  --negro: #2d5242;
  --negro2: #0c1a16;
  --negro3: #13442c;
  --blanco: #f0f5f2;
  --gris: #8a9b91;
  --accent: #00ffaa;
  --font-mono: 'Space Mono', monospace;
  --font-main: 'Syne', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--negro);
  color: var(--blanco);
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
#mainNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,15,13,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(54,158,74,0.2);
  padding: 10px 0;
  transition: all 0.3s ease;
}

#mainNav.scrolled {
  background: rgba(10,15,13,0.98);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blanco);
  letter-spacing: 3px;
}

.brand-dot { color: var(--verde); }

.nav-item-custom {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--gris) !important;
  padding: 6px 12px !important;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.nav-item-custom:hover, .nav-item-custom.active {
  color: var(--accent) !important;
  background: rgba(0,255,170,0.06);
}

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

/* ===== BOTONES ===== */
.btn-nexus-primary {
  background: var(--verde);
  color: var(--blanco);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 1px;
  padding: 12px 28px;
  border-radius: 4px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-nexus-primary:hover {
  background: var(--verde-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(54,158,74,0.35);
}

.btn-nexus-outline {
  background: transparent;
  color: var(--blanco);
  border: 1px solid rgba(240,245,242,0.3);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 1px;
  padding: 12px 28px;
  border-radius: 4px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-nexus-outline:hover {
  border-color: var(--verde);
  color: var(--verde);
  transform: translateY(-2px);
}

.btn-nexus-outline-sm {
  background: transparent;
  border: 1px solid rgba(54,158,74,0.4);
  color: var(--verde);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 7px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-nexus-outline-sm:hover {
  background: var(--verde);
  color: #fff;
}

/* ===== SECCIONES BASE ===== */
.section-dark { background: var(--negro2); }
.section-light { background: #f5f7f5; color: #1a211e; }

.section-header { margin-bottom: 3rem; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--verde);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-main);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--blanco);
  line-height: 1.1;
}

.section-title.dark { color: #1a211e; }

.sub-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blanco);
  border-left: 3px solid var(--verde);
  padding-left: 12px;
}

.sub-title.dark { color: #1a211e; }

/* ===== HERO ===== */
.hero-section {
  background: var(--negro);
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(54,158,74,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54,158,74,0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--verde);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--blanco);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--verde);
  display: block;
  line-height: 1.4;
  margin-top: 6px;
}

.hero-lema {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-desc {
  color: var(--gris);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Code card */
.hero-code-card {
  background: #0d1512;
  border: 1px solid rgba(54,158,74,0.3);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 420px;
}

.code-header {
  background: #111f18;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(54,158,74,0.2);
}

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }

.code-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gris);
  margin-left: 8px;
}

.code-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--blanco);
  margin: 0;
  white-space: pre;
}

.c-green { color: #569cd6; }
.c-yellow { color: #dcdcaa; }
.c-blue { color: #4ec9b0; }
.c-red { color: #ce9178; }

/* ===== SOBRE ===== */
.sobre-card {
  background: var(--negro3);
  border: 1px solid rgba(54,158,74,0.2);
  border-left: 4px solid var(--verde);
  border-radius: 10px;
  padding: 30px;
}

.sobre-icon {
  font-size: 2rem;
  color: var(--verde);
  margin-bottom: 12px;
}

.sobre-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.sobre-card p { color: var(--gris); line-height: 1.8; margin-bottom: 10px; }

/* Timeline */
.timeline { padding-left: 10px; }

.tl-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 46px;
  top: 28px;
  bottom: -20px;
  width: 2px;
  background: rgba(54,158,74,0.2);
}

.tl-item:last-child::before { display: none; }

.tl-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--verde);
  background: rgba(54,158,74,0.1);
  border: 1px solid rgba(54,158,74,0.3);
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-content {
  color: var(--gris);
  font-size: 0.9rem;
  padding-top: 6px;
  line-height: 1.6;
}

/* Misión/Visión/Objetivos */
.mv-card {
  background: var(--negro3);
  border: 1px solid rgba(54,158,74,0.15);
  border-radius: 10px;
  padding: 28px;
  height: 100%;
  transition: border-color 0.3s;
}

.mv-card:hover { border-color: var(--verde); }

.mv-icon {
  font-size: 2rem;
  color: var(--verde);
  margin-bottom: 12px;
}

.mv-card h4 { font-size: 1.15rem; margin-bottom: 10px; }
.mv-card p { color: var(--gris); font-size: 0.9rem; line-height: 1.75; }

.obj-list { list-style: none; padding: 0; }
.obj-list li {
  color: var(--gris);
  font-size: 0.88rem;
  padding: 5px 0;
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.obj-list li::before {
  content: '▸';
  color: var(--verde);
  position: absolute;
  left: 0;
}

/* Líneas */
.linea-card {
  background: var(--negro3);
  border: 1px solid rgba(54,158,74,0.15);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.linea-card:hover {
  border-color: var(--verde);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(54,158,74,0.15);
}

.linea-card i {
  font-size: 2.2rem;
  color: var(--verde);
  display: block;
  margin-bottom: 12px;
}

.linea-card h5 { font-size: 0.95rem; margin-bottom: 8px; }
.linea-card p { color: var(--gris); font-size: 0.83rem; line-height: 1.6; }

/* ===== EVENTOS ===== */
.event-card {
  border-radius: 12px;
  padding: 28px;
  position: relative;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.15); }

.event-card.upcoming {
  background: #fff;
  border: 1px solid #e0e8e4;
  border-top: 4px solid var(--verde);
}

.event-card.past {
  background: #f0f2f1;
  border: 1px solid #dce3de;
  opacity: 0.85;
}

.event-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--verde);
  color: white;
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 12px;
}

.event-date-badge.past-badge { background: #7a8c80; }

.event-date-badge .day {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-badge .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-tag {
  display: inline-block;
  background: rgba(54,158,74,0.12);
  color: var(--verde-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-tag.past-tag {
  background: rgba(100,120,110,0.15);
  color: #5a6e62;
}

.event-card h4 { font-size: 1.05rem; color: #1a211e; margin-bottom: 8px; }
.event-meta { font-size: 0.82rem; color: var(--gris); margin-bottom: 8px; }
.event-meta i { color: var(--verde); }
.event-desc { font-size: 0.88rem; color: #4a5e52; line-height: 1.65; }

/* ===== EQUIPO ===== */
.team-group {
  background: var(--negro3);
  border: 1px solid rgba(54,158,74,0.15);
  border-radius: 14px;
  padding: 30px;
}

.team-group-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 4px;
}

.team-group-header > i {
  font-size: 2rem;
  color: var(--verde);
  margin-top: 4px;
  flex-shrink: 0;
}

.team-group-header h3 { font-size: 1.3rem; margin-bottom: 4px; }
.team-group-header p { color: var(--gris); font-size: 0.88rem; }

.member-card {
  background: var(--negro);
  border: 1px solid rgba(54,158,74,0.12);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.member-card:hover {
  border-color: var(--verde);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(54,158,74,0.12);
}

.member-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.member-card h5 { font-size: 0.95rem; margin-bottom: 4px; }

.member-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--verde);
  display: block;
  margin-bottom: 12px;
}

.member-socials a {
  color: var(--gris);
  font-size: 1rem;
  margin: 0 4px;
  transition: color 0.2s;
  text-decoration: none;
}

.member-socials a:hover { color: var(--verde); }

/* ===== RESULTADOS ===== */
.stat-card {
  background: #fff;
  border: 1px solid #e0e8e4;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(54,158,74,0.15);
  border-color: var(--verde);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--verde);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: #4a5e52;
  display: block;
  margin-top: 4px;
}

.result-card {
  background: #fff;
  border: 1px solid #e0e8e4;
  border-left: 4px solid var(--verde);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: box-shadow 0.3s;
  height: 100%;
}

.result-card:hover { box-shadow: 0 8px 30px rgba(54,158,74,0.12); }

.result-icon {
  font-size: 2rem;
  color: var(--verde);
  flex-shrink: 0;
  margin-top: 4px;
}

.result-card h4 { font-size: 1rem; color: #1a211e; margin-bottom: 8px; }
.result-card p { font-size: 0.88rem; color: #4a5e52; line-height: 1.65; margin-bottom: 10px; }

.result-badge {
  display: inline-block;
  background: rgba(54,158,74,0.12);
  color: var(--verde-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== PRODUCTOS ===== */
.product-card {
  background: var(--negro3);
  border: 1px solid rgba(54,158,74,0.15);
  border-radius: 12px;
  padding: 26px;
  height: 100%;
  transition: border-color 0.3s, transform 0.3s;
}

.product-card:hover {
  border-color: var(--verde);
  transform: translateY(-4px);
}

.product-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-type.book { background: rgba(54,158,74,0.15); color: #7ad68a; }
.product-type.article { background: rgba(0,170,255,0.12); color: #7ac8e8; }
.product-type.ponencia { background: rgba(255,170,0,0.12); color: #e8c877; }
.product-type.informe { background: rgba(255,100,50,0.12); color: #e89877; }

.product-card h4 { font-size: 0.97rem; margin-bottom: 10px; line-height: 1.4; }
.product-authors, .product-year { font-size: 0.8rem; color: var(--gris); margin-bottom: 6px; }
.product-authors i, .product-year i { color: var(--verde); margin-right: 4px; }
.product-card p { font-size: 0.85rem; color: #8a9b91; line-height: 1.65; }

/* ===== GALERÍA ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 220px);
  gap: 15px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
}

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

.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(54,158,74,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 2rem;
  color: white;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gi-large { grid-row: span 2; }
.gi-wide { grid-column: span 2; }

.gallery-modal-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
}

.gallery-modal-caption {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 12px;
}

.gallery-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-close:hover { background: rgba(255,255,255,0.25); }

/* ===== CONTACTO ===== */
.contact-info h3 { font-size: 1.4rem; margin-bottom: 12px; }
.contact-info > p { color: var(--gris); font-size: 0.92rem; line-height: 1.7; margin-bottom: 24px; }

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  color: var(--gris);
  font-size: 0.9rem;
  line-height: 1.6;
}

.contact-item i { color: var(--verde); font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }

.contact-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(54,158,74,0.1);
  border: 1px solid rgba(54,158,74,0.25);
  color: var(--verde);
  font-size: 1.1rem;
  margin-right: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-socials a:hover {
  background: var(--verde);
  color: #fff;
  transform: translateY(-3px);
}

.contact-form-card {
  background: var(--negro3);
  border: 1px solid rgba(54,158,74,0.2);
  border-radius: 14px;
  padding: 36px;
}

.form-label-custom {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gris);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-control-custom {
  width: 100%;
  background: var(--negro);
  border: 1px solid rgba(54,158,74,0.2);
  border-radius: 6px;
  color: var(--blanco);
  font-family: var(--font-main);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
}

.form-control-custom:focus { border-color: var(--verde); }
.form-control-custom::placeholder { color: #3d5045; }

.alert-success-msg {
  background: rgba(54,158,74,0.15);
  border: 1px solid rgba(54,158,74,0.4);
  color: var(--verde-light);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== FOOTER ===== */
.footer {
  background: #060a08;
  border-top: 1px solid rgba(54,158,74,0.15);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blanco);
  letter-spacing: 3px;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--gris);
  margin: 0;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gris);
  margin: 0;
  line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .gi-large { grid-row: span 1; }
  .gi-wide { grid-column: span 1; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 3rem; }
  .hero-code-card { display: none; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 160px 160px;
  }

  .gi-large { grid-row: span 1; }
  .gi-wide { grid-column: span 2; }

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

  .team-group { padding: 20px; }

  .result-card { flex-direction: column; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 2.5rem; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .gi-large, .gi-wide { grid-column: span 1; grid-row: span 1; }

  .gallery-item { height: 200px; }

  .section-title { font-size: 1.8rem; }

  .mv-card, .linea-card, .event-card, .product-card { padding: 20px; }
}
