/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Share Tech Mono', monospace;
  background-color: #dfe8d2;
  color: #d4ddc8;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Fondo con surcos suaves para textura sin recargar la lectura */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(84, 118, 46, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 73, 37, 0.08) 1px, transparent 1px);
  background-size: 56px 56px, 220px 220px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* ===== HEADER ===== */
header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #25351c 0%, #1d2a16 100%);
  color: #8ec05a;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(124, 179, 66, 0.25);
  box-shadow: 0 8px 24px rgba(24, 34, 18, 0.28);
  z-index: 100;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 125, 49, 0.75), transparent);
  opacity: 0.6;
}

@keyframes scanline {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8fc45a;
  text-shadow: 0 0 12px rgba(124, 179, 66, 0.35);
}

header h1 a.logo {
  color: #8fc45a;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  text-shadow: 0 0 12px rgba(124, 179, 66, 0.35);
}

header h1 a.logo:hover {
  color: #9ad060;
  text-shadow: 0 0 16px rgba(124, 179, 66, 0.5);
}

header h1 .bracket {
  color: #c89c63;
  font-weight: 400;
}

/* ===== NAV ===== */
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav ul.menu {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul.menu li a {
  color: #b6c3a2;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
}

nav ul.menu li a:hover,
nav ul.menu li a.active {
  color: #9ad060;
  border-color: rgba(124, 179, 66, 0.4);
  background: rgba(124, 179, 66, 0.16);
  text-shadow: none;
}

nav .idiomas {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}

nav .idiomas .separator {
  color: #67804d;
  font-size: 0.8rem;
}

nav .idiomas a {
  color: #a9b998;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 4px 10px;
  border: 1px solid rgba(124, 179, 66, 0.2);
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 1px;
}

nav .idiomas a:hover,
nav .idiomas a.active-lang {
  color: #9ad060;
  border-color: #7fb34a;
  background: rgba(124, 179, 66, 0.2);
  box-shadow: 0 2px 10px rgba(124, 179, 66, 0.2);
}

/* ===== MAIN CONTENT SECTIONS ===== */
section {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: rgba(29, 40, 21, 0.84);
  border: 1px solid rgba(124, 179, 66, 0.2);
  border-radius: 4px;
  backdrop-filter: blur(5px);
  box-shadow: 0 12px 28px rgba(24, 34, 18, 0.25);
}

section::before {
  content: '>';
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  color: #567834;
  font-size: 0.8rem;
  opacity: 0.22;
}

@keyframes blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0; }
}

section h2 {
  font-size: 1.4rem;
  font-weight: 400;
  color: #88bd54;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(124, 179, 66, 0.2);
  padding-left: 1.5rem;
}

section h2::before {
  content: '//';
  color: #c89c63;
  margin-right: 8px;
  font-weight: 400;
}

section p {
  font-size: 0.95rem;
  color: #d4ddc7;
  line-height: 1.8;
  margin-bottom: 1rem;
}

section strong {
  color: #edf3e4;
}

section img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(92, 125, 49, 0.26);
  border-radius: 4px;
  margin-top: 1.5rem;
  filter: brightness(0.95) contrast(1.05);
}

/* ===== TEAM SECTION ===== */
.team-intro {
  margin-bottom: 1.8rem;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.team-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem;
  background: rgba(24, 34, 18, 0.76);
  border: 1px solid rgba(124, 179, 66, 0.24);
  border-radius: 4px;
}

.team-card img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 4px;
  margin-top: 0;
}

.team-text h3 {
  font-size: 0.95rem;
  color: #d3a467;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.team-text p {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #c3cfb5;
}

/* ===== PUBLICATIONS SECTION ===== */
.pub-intro {
  margin-bottom: 1rem;
}

.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pub-item {
  background: rgba(24, 34, 18, 0.76);
  border: 1px solid rgba(124, 179, 66, 0.24);
  border-radius: 4px;
  padding: 1rem;
}

.pub-item h3 {
  font-size: 0.95rem;
  color: #d3a467;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.pub-item p {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: #c3cfb5;
}

.pub-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.pub-links li {
  margin-bottom: 0.45rem;
  word-break: break-word;
}

/* ===== HERO SECTION (index page) ===== */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: #1f2b17;
  border: 1px solid rgba(124, 179, 66, 0.2);
}

.hero::before {
  display: none;
}

.hero h2 {
  font-size: 2rem;
  text-align: center;
  border-bottom: none;
  padding-left: 0;
  margin-bottom: 0.5rem;
}

.hero h2::before {
  display: none;
}

.hero .subtitle {
  color: #c89c63;
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  color: #ccd7be;
}

.contact-quadrant {
  max-width: 1300px;
  margin: 3rem auto;
  text-align: center;
  background: rgba(24, 34, 18, 0.88);
  padding: 2.5rem;
}

.contact-quadrant::before {
  display: none;
}

.contact-quadrant h2 {
  text-align: center;
  border-bottom: none;
  padding-left: 0;
  margin-bottom: 0.8rem;
}

.contact-quadrant h2::before {
  display: none;
}

.contact-mail-button {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid rgba(151, 198, 95, 0.58);
  border-radius: 3px;
  background: rgba(124, 179, 66, 0.2);
  color: #f1e3c9;
  letter-spacing: 0.8px;
  font-size: 0.92rem;
  transition: all 0.3s ease;
}

.contact-mail-button:hover {
  background: rgba(151, 198, 95, 0.34);
  border-color: #b7dd82;
  color: #ffffff;
  transform: translateY(-1px);
}

.contact-mail-address {
  display: inline-block;
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #c3cfb5;
  border-bottom: 1px solid rgba(151, 198, 95, 0.45);
  padding-bottom: 2px;
}

.contact-mail-address:hover {
  color: #ffffff;
  border-bottom-color: #b7dd82;
}

.contact-subtitle {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #d3a467;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.contact-address {
  max-width: none;
  margin: 0.35rem 0 0;
  color: #c3cfb5;
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.9fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
  text-align: left;
}

.contact-grid.parallel-columns {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.contact-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(124, 179, 66, 0.22);
  background: rgba(26, 37, 19, 0.45);
  border-radius: 3px;
}

/* ===== STATUS BAR / FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid rgba(124, 179, 66, 0.2);
  background: rgba(26, 37, 19, 0.9);
  font-size: 0.75rem;
  color: #9fb18c;
  letter-spacing: 1px;
}

footer span.status {
  color: #8ec05a;
}

/* ===== ATLAS PAGE ===== */
#atlas-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 600px;
  padding: 0;
  margin: 1rem auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

#atlas-container::before {
  display: none;
}

/* Botón volver */
.back-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  padding: 10px 18px;
  background: rgba(25, 35, 18, 0.94);
  border: 1px solid rgba(124, 179, 66, 0.35);
  text-decoration: none;
  color: #8ec05a;
  border-radius: 2px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(18, 26, 13, 0.32);
}

.back-button:hover {
  background: rgba(124, 179, 66, 0.18);
  box-shadow: 0 8px 18px rgba(35, 50, 23, 0.35);
}

/* Botón info */
.info-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 35, 18, 0.94);
  border: 1px solid rgba(124, 179, 66, 0.35);
  text-decoration: none;
  color: #8ec05a;
  border-radius: 2px;
  font-weight: bold;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(18, 26, 13, 0.32);
}

.info-button:hover {
  background: rgba(124, 179, 66, 0.18);
  box-shadow: 0 8px 18px rgba(35, 50, 23, 0.35);
}

/* Panel fondo oscuro */
.info-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 20, 10, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.info-panel:target {
  display: flex;
}

/* Caja de contenido */
.info-content {
  background: #23321c;
  padding: 2rem;
  max-width: 450px;
  border: 1px solid rgba(124, 179, 66, 0.3);
  border-radius: 4px;
  font-family: 'Share Tech Mono', monospace;
  color: #d6dfca;
  box-shadow: 0 14px 32px rgba(8, 12, 6, 0.5);
}

.info-content h3 {
  color: #8ec05a;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 1rem;
}

/* Botón cerrar */
.close-button {
  display: inline-block;
  margin-top: 15px;
  text-decoration: none;
  color: #8ec05a;
  background: rgba(124, 179, 66, 0.12);
  border: 1px solid rgba(124, 179, 66, 0.34);
  padding: 8px 16px;
  border-radius: 2px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.close-button:hover {
  background: rgba(124, 179, 66, 0.2);
  box-shadow: 0 5px 12px rgba(35, 50, 23, 0.28);
}

/* ===== LINKS ===== */
a {
  color: #d3a467;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #8ec05a;
  text-shadow: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #24341b;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 179, 66, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 179, 66, 0.55);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  body {
    font-size: 1.03rem;
  }

  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul.menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  nav ul.menu li a {
    font-size: 0.82rem;
    padding: 4px 10px;
  }

  section {
    margin: 1.5rem 1rem;
    padding: 1.5rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .contact-quadrant {
    margin: 1.5rem 1rem;
    padding: 1.1rem;
  }

  .contact-mail-button {
    font-size: 0.86rem;
    padding: 0.65rem 0.9rem;
    word-break: break-all;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid.parallel-columns {
    grid-template-columns: 1fr;
  }

  .contact-item {
    padding: 0.7rem 0.75rem;
  }

  .hero h2 {
    font-size: 1.6rem;
  }

  section p,
  .hero p,
  .team-text p,
  .pub-item p {
    font-size: 1rem;
    line-height: 1.75;
  }

  .team-card {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .team-card img {
    width: 150px;
    height: 150px;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== TEAM SOCIAL LINKS ===== */
.team-socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(124, 179, 66, 0.28);
  border: 1px solid rgba(151, 198, 95, 0.58);
  border-radius: 3px;
  color: #f1e3c9;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(21, 30, 14, 0.32);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(151, 198, 95, 0.42);
  border-color: #b7dd82;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(45, 64, 29, 0.34);
}
