/* ============================================================
   styles.css — Tito Parra · Portafolio profesional
   Tema oscuro moderno con acentos en degradado azul-cian
   ============================================================ */

/* ---------- Variables y reset ---------- */
:root {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --surface: #16213b;
  --surface-2: #1d2a4a;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(2, 6, 23, 0.55);
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ---------- Animación de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(11, 17, 32, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.is-scrolled {
  background: rgba(11, 17, 32, 0.88);
  border-bottom-color: var(--border);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.nav__logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
}

.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.25s ease;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}

.nav__links a.is-active::after {
  transform: scaleX(1);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Selector de idioma */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color 0.25s ease;
}

.lang-toggle:hover {
  border-color: var(--accent);
}

.lang-toggle__opt {
  transition: color 0.25s ease;
}

.lang-toggle__opt.is-active {
  color: var(--accent);
}

.lang-toggle__divider {
  opacity: 0.35;
}

/* Hamburguesa (móvil) */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0 10px;
}

.nav__burger span {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
  background: var(--gradient);
  color: #0b1120;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.5);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
}

.hero__glow--1 {
  width: 520px;
  height: 520px;
  background: #1d4ed8;
  top: -140px;
  right: -120px;
}

.hero__glow--2 {
  width: 420px;
  height: 420px;
  background: #0e7490;
  bottom: -160px;
  left: -140px;
}

.hero__net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

/* Badge de disponibilidad */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}

.hero__badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  position: relative;
}

.hero__badge-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.hero__kicker {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 600;
  margin-top: 1rem;
  color: var(--text);
}

.hero__divider {
  margin: 0 0.6rem;
  color: var(--text-muted);
}

.hero__accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-top: 1.4rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-top: 4rem;
}

.stat {
  background: rgba(22, 33, 59, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  backdrop-filter: blur(6px);
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Indicador de scroll */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 2px solid var(--text-muted);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  opacity: 0.6;
}

.hero__scroll span {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollHint 1.8s infinite ease-in-out;
}

@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0.2; }
}

/* ---------- Secciones ---------- */
.section {
  padding: 6rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__kicker {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.8rem;
}

/* ---------- Sobre mí ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p + p {
  margin-top: 1.25rem;
}

.about__text {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.about__card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.about__facts li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
  color: var(--text-muted);
}

.about__facts li:last-child {
  border-bottom: none;
}

.about__icon {
  flex-shrink: 0;
}

/* ---------- Especialización ---------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--shadow);
}

.skill-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin-bottom: 0.6rem;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Stack tecnológico */
.tech {
  margin-top: 3.5rem;
  text-align: center;
}

.tech__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1.4rem;
}

.tech__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.tech__list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.25s ease, color 0.25s ease;
}

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

/* ---------- Impacto IA ---------- */
.section--accent {
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(56, 189, 248, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(129, 140, 248, 0.08), transparent),
    var(--bg-alt);
}

.cases__lead {
  color: var(--text-muted);
  max-width: 640px;
  margin-top: -1.6rem;
  margin-bottom: 2.8rem;
  font-size: 1.05rem;
}

.cases__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.case-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.case-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--shadow);
}

.case-card__tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

.case-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.case-card__block h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.case-card__block--result h4 {
  color: #4ade80;
}

.case-card__block p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.case-card__metric {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.case-card__metric strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.case-card__metric span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Experiencia (timeline) ---------- */
.timeline {
  position: relative;
  max-width: 780px;
  padding-left: 2.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}

.timeline__item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: -2.2rem;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.15);
}

.timeline__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  margin-bottom: 0.8rem;
}

.timeline__content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.timeline__company {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.25rem 0 0.9rem;
}

.timeline__content ul li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.timeline__content ul li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Formación ---------- */
.edu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.edu__heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.1rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.edu-card:hover {
  border-color: rgba(129, 140, 248, 0.45);
  transform: translateX(4px);
}

.edu-card__year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.08em;
}

.edu-card h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0.35rem 0 0.3rem;
}

.edu-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.cert-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}

.cert-list li:last-child {
  border-bottom: none;
}

.cert-list em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ---------- Contacto ---------- */
.contact__lead {
  color: var(--text-muted);
  max-width: 560px;
  margin-top: -1.6rem;
  margin-bottom: 2.8rem;
  font-size: 1.05rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: var(--shadow);
}

.contact-card__icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.contact-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-card__value {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-alt);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer__top {
  color: var(--accent);
  font-weight: 600;
  transition: opacity 0.25s ease;
}

.footer__top:hover {
  opacity: 0.75;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about__grid,
  .edu__grid {
    grid-template-columns: 1fr;
  }

  .about__card {
    position: static;
  }
}

@media (max-width: 768px) {
  .nav__burger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 17, 32, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__links a {
    padding: 0.9rem 6%;
    font-size: 1rem;
  }

  .nav__links a::after {
    display: none;
  }

  .section {
    padding: 4.5rem 0;
  }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 3rem;
  }

  .timeline {
    padding-left: 1.8rem;
  }

  .timeline__marker {
    left: -1.8rem;
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 420px) {
  .hero__stats {
    grid-template-columns: 1fr;
  }

  .hero__cta .btn {
    width: 100%;
    text-align: center;
  }
}
