:root {
  --primary-color: #00ff9d;
  --secondary-color: #0a192f;
  --accent-color: #64ffda;
  --text-color: #8892b0;
  --hover-color: #112240;
}

body {
  margin: 0;
  padding: 0;
  background: var(--secondary-color);
  font-family: "Fira Code", monospace;
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  top: 0;
  left: 0;
}

.landing-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Terminal Effect */
.terminal-intro {
  background: rgba(10, 25, 47, 0.85);
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
  backdrop-filter: blur(10px);
}

.terminal-header {
  background: #1d2230;
  padding: 10px;
  border-radius: 10px 10px 0 0;
  display: flex;
  gap: 6px;
}

.terminal-body {
  padding: 1.5rem;
  font-family: "Courier New", monospace;
}

.command-line {
  margin: 0.5rem 0;
}

.prompt {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.command {
  color: var(--accent-color);
}

.response {
  color: var(--text-color);
  margin-left: 1rem;
  margin-bottom: 1rem;
}

/* Última respuesta: cursor = ::after del propio span (sigue al texto al escribir; sin nodo extra) */
.response-line {
  display: block;
  margin-left: 1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.response-line > .response {
  margin: 0;
  color: var(--text-color);
}

/* Sin texto aún = sin cursor (evita bloque verde en la línea de debajo mientras teclea "location") */
.response-line .typing-text--cursor:not(:empty)::after {
  content: "";
  display: inline-block;
  width: 0.55ch;
  min-width: 8px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--primary-color);
  animation: blink 1s step-end infinite;
}

.terminal-cursor {
  display: inline-block;
  width: 0.55ch;
  min-width: 8px;
  height: 1.1em;
  background: var(--primary-color);
  animation: blink 1s step-end infinite;
  margin-left: 0;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot:nth-child(1) {
  background: #ff5f56;
}
.dot:nth-child(2) {
  background: #ffbd2e;
}
.dot:nth-child(3) {
  background: #27c93f;
}

/* Portal Navigation */
.portal-navigation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 1rem;
  position: relative;
  width: 100%;
  max-width: 500px;
}

.portal-button {
  position: relative;
  background: var(--hover-color);
  padding: 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  min-height: 120px;
  justify-content: center;
}

.portal-button:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(0, 255, 157, 0.1);
  z-index: 10;
}

.portal-button .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  filter: grayscale(0);
}

.portal-button .text {
  font-weight: 500;
  text-align: center;
}

.hover-info {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hover-color);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--primary-color);
}

.portal-button:hover .hover-info {
  opacity: 1;
  bottom: -50px;
}

/* Quick Contact */
.quick-contact {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
  z-index: 1000;
}

.contact-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(10, 25, 47, 0.8);
  border-radius: 50%;
  border: 1px solid var(--primary-color);
}

.contact-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 157, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .landing-container {
    gap: 1.5rem;
  }

  .terminal-intro {
    width: 95%;
  }

  .portal-navigation {
    max-width: 450px;
  }
}

@media (max-width: 768px) {
  .portal-navigation {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .portal-button {
    margin-top: 0 !important;
    min-height: 100px;
    padding: 1rem;
  }

  .hover-info {
    bottom: -30px;
    font-size: 0.7rem;
  }

  .portal-button:hover .hover-info {
    bottom: -40px;
  }

  .terminal-intro {
    width: 95%;
  }

  .quick-contact {
    bottom: 1rem;
    right: 1rem;
  }

  .contact-icon {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .landing-container {
    padding: 1rem 0.5rem;
  }

  .terminal-body {
    padding: 1rem;
  }

  .portal-button {
    padding: 1rem 0.5rem;
  }
}
