/* ===== Tokens ===== */
:root {
  --bg: #0b100d;
  --bg-panel: #101713;
  --border: #1e2a22;

  --text: #e8ede9;
  --text-muted: #a2a2a2;

  --accent: #5ddc8f;
  /* verde placa, apagado */
  --accent-warm: #c98a4e;
  /* cobre / soldadura */

  --font-display: "IBM Plex Mono", "Courier New", monospace;
  --font-body: "Inter", -apple-system, sans-serif;

  --content-width: 1200px;
}

/* ===== Reset básico ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(11, 16, 13, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  opacity: 0;
  transform: translateY(-15px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.navbar--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navbar__logo {
  font-family: var(--font-display);
  color: var(--accent);
}

.navbar__links {
  display: flex;
  gap: 1.5rem;
}

.navbar__links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.navbar__links a:hover {
  color: var(--text);
}

.navbar__github {
  display: flex;
  align-items: center;
}

/* ===== Efecto de particulas ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
}

/* ===== Layout general de secciones ===== */
section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

/* ===== Hero ===== */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero__subtitle {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.hero__eyebrow {
  font-family: var(--font-display);
  color: var(--accent-warm);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.hero__cta {
  position: relative;
  display: inline-block;
  width: fit-content;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
}

.hero__cta::before,
.hero__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.hero__cta:hover::before {
  animation: anillo 1.2s ease-out infinite;
}

.hero__cta:hover::after {
  animation: anillo 1.2s ease-out infinite;
  animation-delay: 0.4s;
}

@keyframes anillo {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.hero__cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero__cta--cv {
  border-color: var(--accent-warm);
  color: var(--accent-warm);
}

.hero__cta--cv::before,
.hero__cta--cv::after {
  border-color: var(--accent-warm);
}

.hero__cta--cv:hover {
  background: var(--accent-warm);
  color: var(--bg);
}

/* ===== About ===== */
#about {
  max-width: 1000px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3rem;
  row-gap: 2rem;
  align-items: start;
}

#about .section__title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.about__content {
  max-width: 560px;
}

.about__content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-content: start;
}

.skills li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 90px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  transition: border-color 0.2s ease;
}

.skills li:hover {
  border-color: var(--accent);
}

.skills__icon {
  width: 32px;
  height: 32px;
}

/* ===== Trayectoria (línea de tiempo) ===== */
.trayectoria__legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.trayectoria__legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-left: 1.25rem;
}

.trayectoria__legend-dot:first-child {
  margin-left: 0;
}

.trayectoria__legend-dot--trabajo {
  background: var(--accent);
}

.trayectoria__legend-dot--educacion {
  background: var(--accent-warm);
}

.timeline {
  position: relative;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 1.5rem;
}

.timeline__card {
  display: grid;
  grid-template-columns: 320px 1fr;
  column-gap: 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.timeline__card:hover {
  background: var(--bg-panel);
  border-color: var(--border);
}

.timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 1.5rem;
  background: var(--accent);
}

.timeline__dot--educacion {
  background: var(--accent-warm);
}

.timeline__dates {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--accent-warm);
  margin-bottom: 0.25rem;
}

.timeline__role {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.timeline__org {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.timeline__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 620px;
}

/* ===== Projects ===== */
.projects__list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 1.5rem;
}

.project-card--with-image {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  cursor: zoom-in;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 100;
}

.lightbox-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--border);
  cursor: zoom-out;
}

.project-card--with-image .project-card__image {
  margin-bottom: 0;
}

.project-card__status {
  font-family: var(--font-display);
  color: var(--accent-warm);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.project-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.project-card__description {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 640px;
}

.project-card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-card__tags li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-icon {
  width: 14px;
  height: 14px;
}

.project-card__link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-card__link:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ===== Contact ===== */
.contact__intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  max-width: 520px;
}

.contact__form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact__form input,
.contact__form textarea {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem;
  font-family: var(--font-body);
}

.contact__form button {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--font-display);
  cursor: pointer;
}

.contact__links {
  display: flex;
  gap: 1.5rem;
}

/* ===== Botón volver arriba ===== */
.btn-arriba {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, color 0.2s ease;
  z-index: 50;
}

.btn-arriba--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-arriba:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 700px) {
  .navbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }

  .navbar__links {
    justify-content: center;
    gap: 1rem;
    font-size: 0.85rem;
  }

  #about {
    grid-template-columns: 1fr;
  }

  .navbar__github {
    display: none;
  }

  .project-card--with-image {
    grid-template-columns: 1fr;
  }

  .project-card--with-image .project-card__image {
    margin-bottom: 1rem;
  }

  .timeline__card {
    grid-template-columns: 1fr;
    row-gap: 0.5rem;
    padding: 1rem;
  }
}

/* ===== Animaciones de entrada del Hero ===== */
@keyframes entradaIzquierda {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes entradaDerecha {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes entradaAbajo {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__eyebrow {
  animation: entradaIzquierda 0.6s ease-out both;
}

.hero__title {
  animation: entradaIzquierda 0.6s ease-out 0.15s both;
}

.hero__subtitle {
  animation: entradaDerecha 0.6s ease-out 0.3s both;
}

.hero__cta {
  animation: entradaAbajo 0.6s ease-out 0.5s both;
}