:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card-bg: #0f172a;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --accent-strong: #4f46e5;
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --border-soft: rgba(148, 163, 184, 0.3);
  --danger: #f97373;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --transition-fast: 0.2s ease-out;
  --transition-med: 0.35s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Poppins",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: radial-gradient(
    circle at top,
    #111827 0,
    #020617 45%,
    #020617 100%
  );
  color: var(--text);
}




/* Layout base */

.section {
  padding: 6rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.section-alt {
  background: radial-gradient(
    circle at top left,
    #020617 0,
    #020617 40%,
    #020617 100%
  );
}

.container {
  max-width: 1120px;
  margin: 0 auto;
}

/* Header / Navbar */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.6),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #a855f7, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.7);
}

.logo p {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.nav {
  position: relative;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.nav-link:hover {
  color: #f9fafb;
  background: rgba(148, 163, 184, 0.15);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #f9fafb;
  background: rgba(99, 102, 241, 0.18);
}

/* Botón nav */

.btn-nav {
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Toggle móvil */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
}

/* Hero */

.hero {
  padding-top: 7rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(
      circle at 90% 10%,
      rgba(129, 140, 248, 0.25),
      transparent 55%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(236, 72, 153, 0.18),
      transparent 55%
    );
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

 .social-container {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 0.8rem;
}

.social-icon {
  width: 22px;
  height: 22px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

.social-icon:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text-soft);
  font-size: 0.75rem;
}

.hero-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
}

.hero-title {
  margin: 1.2rem 0 0.4rem;
  font-size: clamp(2.1rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
}

.hero-title span {
  background: linear-gradient(to right, #a855f7, #6366f1, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0.2rem 0 1rem;
  font-size: 1.1rem;
  color: var(--text-soft);
  min-height: 1.4em;
}

.hero-description {
  margin: 0 0 1.5rem;
  color: var(--text-soft);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background var(--transition-med),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #f9fafb;
  box-shadow: 0 16px 35px rgba(79, 70, 229, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.8);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.hero-info span {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
}

/* Hero card */

.hero-card {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(
      circle at top left,
      rgba(129, 140, 248, 0.2),
      transparent 55%
    ),
    #020617;
  border-radius: 24px;
  padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(236, 72, 153, 0.18), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.18), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.hero-photo {
  width: 130px; /* Más grande */
  height: 130px;
  border-radius: 50%; /* Circular */
  object-fit: cover;
  border: 4px solid rgba(99, 102, 241, 0.7);
  box-shadow: 0 12px 35px rgba(79, 70, 229, 0.45);
  background: #0f172a;
}

.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #6366f1, #a855f7, #22d3ee, #6366f1);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle::before {
  content: "";
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(
    circle at 30% 20%,
    #020617,
    #020617 60%,
    #020617 100%
  );
}

.avatar-initials {
  position: absolute;
  left: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: #e5e7eb;
}

.hero-card-body {
  position: relative;
  z-index: 1;
}

.hero-card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.hero-card-body p {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.hero-badges li {
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Section header */

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
}

.section-header p {
  margin: 0;
  color: var(--text-soft);
  max-width: 32rem;
  margin-inline: auto;
  font-size: 0.95rem;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
}

.about-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.about-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.1rem;
}

.about-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.about-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.about-list li + li {
  margin-top: 0.4rem;
}

/* Timeline */

.timeline {
  position: relative;
  padding-left: 1.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(148, 163, 184, 0.4), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -0.05rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6366f1;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.25);
}

.timeline-content {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--border-soft);
  align-items: center;
}

.timeline-content h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.timeline-entity {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.timeline-date {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.timeline-logo img {
  width: 60px;
  height: auto;
  object-fit: contain;
  margin-right: 1rem;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
  border-radius: 6px;
}

.timeline-info {
  flex: 1;
}

/* Cards (proyectos, certificaciones) */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.project-img {
  width: 100%;          /* La imagen ocupa todo el ancho de la card */
  height: 160px;        /* Altura uniforme para todas las cards */
  object-fit: cover;    /* Recorta de forma elegante sin deformar */
  border-radius: 8px;   /* Bordes suaves */
  margin-bottom: 1rem;  /* Separación del contenido */
  display: block;       /* Evita espacios raros */
}

/* */
.project-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.github-icon {
  width: 24px;
  height: 24px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}

.github-icon svg {
  width: 100%;
  height: 100%;
}

.github-icon:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.github-img {
  width: 60px;
  height: 60px;
  opacity: 0.8;
  transition: 0.25s ease;
}

.github-img:hover {
  opacity: 1;
  transform: scale(1.15);
}

.card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-med),
    background var(--transition-med);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(129, 140, 248, 0.18), transparent 55%),
    radial-gradient(
      circle at 100% 100%,
      rgba(236, 72, 153, 0.18),
      transparent 55%
    );
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 1);
  border-color: rgba(129, 140, 248, 0.7);
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.98)
  );
}

.card:hover::before {
  opacity: 1;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.7rem;
  color: var(--text-soft);
  margin-bottom: 0.6rem;
}

.card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.card-role {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.card-date {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.card-note {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.card-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.card-list li + li {
  margin-top: 0.3rem;
}

.card-tags {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-tags span {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.card-thumb {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.8rem;
  display: block;
}

/*  MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

#certCaption {
  margin: 15px auto;
  text-align: center;
  color: #ccc;
  font-size: 18px;
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
}

.skills-column {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.skills-column h3 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.chip {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-soft);
}

.skills-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.skills-list li + li {
  margin-top: 0.4rem;
}

/* Contacto */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 1.8rem;
}

.contact-info {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.contact-info h3 {
  margin: 0 0 0.7rem;
}

.contact-info ul {
  margin: 0 0 0.8rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.contact-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.contact-form {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  color: var(--text-soft);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5);
  background: rgba(15, 23, 42, 1);
}

/* Footer */

.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1.2rem 1.5rem 1.4rem;
  background: rgba(15, 23, 42, 0.98);
}

.footer-content {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* Animaciones de entrada (scroll) */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);


  }

    
}

@media (max-width: 768px) {
  .nav-list {
    position: absolute;
    right: 0;
    top: 110%;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.98);
    padding: 0.8rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 1);
    transform-origin: top right;
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity var(--transition-med),
      transform var(--transition-med);
  }

  .nav-list.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .section {
    padding-inline: 1.2rem;
  }

  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

    

}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-info {
    flex-direction: column;
  }



}
