/* ============================================================
   Emiliano Conti — "Misión Orbital"
   Paleta: azul profundo + cian eléctrico + violeta nebular
   ============================================================ */

:root {
  --bg: #05060f;
  --bg-soft: #0a0c1c;
  --surface: rgba(16, 19, 40, 0.55);
  --surface-strong: rgba(20, 24, 50, 0.8);
  --line: rgba(140, 150, 220, 0.16);
  --text: #e9eaf4;
  --muted: #9aa2c0;
  --cyan: #5eead4;
  --cyan-bright: #7df9ff;
  --violet: #8b7bff;
  --amber: #ffc46b;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Sora", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-w: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(94, 234, 212, 0.3); }

.mono { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; }

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ====== Canvas del universo ====== */
#universe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.nebula-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 70% 12%, rgba(139, 123, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 65% 45% at 15% 85%, rgba(94, 234, 212, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(5, 6, 15, 0.25) 0%, rgba(5, 6, 15, 0.55) 45%, rgba(5, 6, 15, 0.85) 100%);
}

main, .nav, .footer { position: relative; z-index: 2; }

/* ====== Navegación ====== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.75), rgba(5, 6, 15, 0));
  transition: background 0.4s ease;
}

.nav.scrolled {
  background: rgba(5, 6, 15, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
}

.nav__brand-orbit {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(94, 234, 212, 0.5);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.nav__brand-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: orbit-spin 6s linear infinite;
  transform-origin: 3px 3px;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg) translateX(15px); }
  to   { transform: rotate(360deg) translateX(15px); }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav__links a {
  color: var(--muted);
  transition: color 0.25s ease;
  position: relative;
}

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

.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  color: var(--cyan) !important;
  border: 1px solid rgba(94, 234, 212, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.nav__cta:hover {
  background: rgba(94, 234, 212, 0.1);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.25);
}

@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ====== Hero ====== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.hero__eyebrow {
  color: var(--cyan);
  margin-bottom: 1.6rem;
  animation: rise 0.9s ease 0.1s both;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero__line {
  display: block;
  animation: rise 0.9s ease 0.25s both;
}

.hero__line--accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cyan);
  animation-delay: 0.4s;
}

.hero__subtitle {
  margin-top: 2rem;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--text);
  animation: rise 0.9s ease 0.55s both;
}

.hero__cred { color: var(--violet); font-weight: 400; }

.hero__tagline {
  margin-top: 1rem;
  max-width: 34rem;
  color: var(--muted);
  animation: rise 0.9s ease 0.7s both;
}

.hero__actions {
  margin-top: 2.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: rise 0.9s ease 0.85s both;
}

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: var(--pad);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  animation: rise 0.9s ease 1.2s both;
}

.hero__scroll-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Botones ====== */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 1.8rem;
  border-radius: 2px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
  background: var(--cyan);
  color: #041210;
  font-weight: 500;
  box-shadow: 0 0 0 rgba(94, 234, 212, 0);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(94, 234, 212, 0.35);
}

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

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

.btn--lg { padding: 1.15rem 2.4rem; font-size: 0.85rem; }

/* ====== Secciones genéricas ====== */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
}

.section__head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.section__kicker { color: var(--cyan); margin-bottom: 0.9rem; }

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ====== Sobre mí ====== */
.about__lead {
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  font-weight: 400;
  line-height: 1.5;
  max-width: 52rem;
  margin-bottom: 2.5rem;
}

.about__lead strong { color: var(--cyan); font-weight: 600; }

.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  color: var(--muted);
  max-width: 52rem;
}

.about__stats {
  list-style: none;
  margin-top: 3.5rem;
  display: flex;
  gap: clamp(2rem, 6vw, 5rem);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 2.2rem;
}

.about__stats li { display: flex; flex-direction: column; gap: 0.3rem; }

.about__stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--cyan);
  line-height: 1;
}

.about__stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ====== Órbitas ====== */
.orbits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.orbit {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2.2rem 1.8rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.orbit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.orbit:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(94, 234, 212, 0.08);
}

.orbit:hover::before { opacity: 1; }

.orbit--primary { border-color: rgba(139, 123, 255, 0.35); }

.orbit__icon { height: 56px; margin-bottom: 1.4rem; }

.orbit__planet {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  animation: planet-float 5s ease-in-out infinite;
}

.orbit__planet--cyan {
  background: radial-gradient(circle at 32% 30%, #b4fff3, var(--cyan) 45%, #0d5c52 100%);
  box-shadow: 0 0 28px rgba(94, 234, 212, 0.5);
}

.orbit__planet--violet {
  background: radial-gradient(circle at 32% 30%, #d4cbff, var(--violet) 45%, #2d2470 100%);
  box-shadow: 0 0 28px rgba(139, 123, 255, 0.5);
}

.orbit__planet--amber {
  background: radial-gradient(circle at 32% 30%, #ffe9c9, var(--amber) 45%, #7a4d14 100%);
  box-shadow: 0 0 28px rgba(255, 196, 107, 0.45);
}

.orbit__planet::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 74px;
  margin: -37px;
  border: 1px solid rgba(233, 234, 244, 0.25);
  border-radius: 50%;
  transform: rotateX(62deg);
}

@keyframes planet-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.orbit__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.orbit__desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }

.orbit__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.orbit__tags li {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.3rem 0.65rem;
  color: var(--cyan);
  font-size: 0.68rem;
}

/* ====== Stack ====== */
.stack { display: flex; flex-direction: column; gap: 2.8rem; }

.stack__label {
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.stack__belt, .star-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.star-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(16, 19, 40, 0.4);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.star-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(94, 234, 212, 0.15);
}

/* ====== Trayectoria ====== */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 2.4rem;
  max-width: 46rem;
}

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

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

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

.timeline__dot {
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  background: var(--bg);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.timeline__item:hover .timeline__dot {
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.timeline__year { color: var(--cyan); display: block; margin-bottom: 0.4rem; }

.timeline__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.timeline__desc { color: var(--muted); font-size: 0.95rem; }

/* ====== Proyectos ====== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2rem 1.8rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.project:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 123, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(139, 123, 255, 0.08);
}

.project__id { color: var(--violet); }

.project__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.project__desc { color: var(--muted); font-size: 0.95rem; flex: 1; }

.project__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project__tags li {
  color: var(--cyan);
  font-size: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.3rem 0.65rem;
}

/* ====== Contacto ====== */
.section--contact { text-align: center; }

.contact { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }

.contact__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 1.12;
}

.text-accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cyan);
}

.contact__desc { color: var(--muted); max-width: 30rem; }

.contact__links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.contact__links a {
  color: var(--muted);
  transition: color 0.25s ease;
}

.contact__links a:hover { color: var(--cyan); }

/* ====== Footer ====== */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--pad);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer__coords { color: rgba(154, 162, 192, 0.5); }

/* ====== Reveals ====== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger en grupos */
.orbits .reveal:nth-child(2) { transition-delay: 0.12s; }
.orbits .reveal:nth-child(3) { transition-delay: 0.24s; }
.projects .reveal:nth-child(2) { transition-delay: 0.1s; }
.projects .reveal:nth-child(3) { transition-delay: 0.2s; }
.projects .reveal:nth-child(4) { transition-delay: 0.3s; }
.timeline .reveal:nth-child(2) { transition-delay: 0.1s; }
.timeline .reveal:nth-child(3) { transition-delay: 0.2s; }
.timeline .reveal:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow, .hero__line, .hero__subtitle, .hero__tagline, .hero__actions, .hero__scroll { animation: none; }
  .orbit__planet, .nav__brand-orbit::after, .hero__scroll-dot { animation: none; }
}
