@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #07101d;
  --bg-soft: #0b1626;
  --panel: #0f1d2e;
  --text: #edf4fb;
  --muted: #9eafc2;
  --line: rgba(255,255,255,.10);
  --accent: #5ee7d1;
  --accent-2: #7bb7ff;
  --max: 1160px;
  --radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

/* ==============================
   ENCABEZADO
   ============================== */

.site-header {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 22%, rgba(94,231,209,.13), transparent 28%),
    radial-gradient(circle at 15% 70%, rgba(123,183,255,.10), transparent 28%),
    linear-gradient(145deg, #07101d, #09182a 60%, #07101d);
  overflow: hidden;
  position: relative;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

/* ==============================
   MENÚ
   ============================== */

.navbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: .12em;
  font-size: .92rem;
}

.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: .9rem;
  color: var(--muted);
}

.nav-menu a {
  transition: color .25s ease;
}

.nav-menu a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px;
  background: var(--text);
}

/* ==============================
   HERO
   ============================== */

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 2;
  padding-block: 70px;
}

.eyebrow,
.section-tag {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 20px 0 28px;
}

.hero h1 span {
  color: var(--accent-2);
}

.hero-text {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  transition:
    transform .2s ease,
    background .2s ease,
    border-color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #06131b;
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--text);
}

/* ==============================
   ELEMENTO VISUAL
   ============================== */

.hero-card {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: min(420px, 80vw);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle, rgba(94,231,209,.12), transparent 58%);
  box-shadow: 0 0 80px rgba(94,231,209,.08);
}

.hero-card p {
  text-align: center;
  letter-spacing: .3em;
  font-size: .78rem;
  color: var(--muted);
  line-height: 2;
}

.hero-card p strong {
  color: var(--accent);
}

.core {
  width: 128px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(94,231,209,.55);
  background: rgba(7,16,29,.78);
  box-shadow: 0 0 45px rgba(94,231,209,.18);
  position: relative;
  z-index: 2;
}

.core span {
  font-family: "Space Grotesk";
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.orbit {
  position: absolute;
  border: 1px dashed rgba(123,183,255,.35);
  border-radius: 50%;
}

.orbit-one {
  inset: 14%;
  transform: rotate(32deg) scaleY(.52);
}

.orbit-two {
  inset: 8%;
  transform: rotate(-38deg) scaleY(.55);
}

/* ==============================
   SECCIONES
   ============================== */

.section {
  padding: 110px 0;
}

.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 55px;
}

.section-heading h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  margin-top: 12px;
  max-width: 800px;
}

/* ==============================
   SOBRE MÍ
   ============================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 70px;
  align-items: start;
}

.lead {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 24px;
}

.about-grid p:not(.lead) {
  color: var(--muted);
}

.info-panel {
  border-top: 1px solid var(--line);
}

.info-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 5px;
}

.info-item strong {
  font-size: .96rem;
}

/* ==============================
   PROYECTOS
   ============================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: rgba(255,255,255,.025);
  transition:
    transform .25s ease,
    border-color .25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94,231,209,.45);
}

.card-number {
  color: var(--accent);
  font-family: "Space Grotesk";
  font-size: .8rem;
}

.project-card h3 {
  font-family: "Space Grotesk";
  font-size: 1.55rem;
  margin: 55px 0 16px;
}

.project-card p {
  color: var(--muted);
}

.card-label {
  display: inline-block;
  margin-top: 26px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-2);
}

/* ==============================
   TECNOLOGÍAS
   ============================== */

.tech-list {
  border-top: 1px solid var(--line);
}

.tech-item {
  display: grid;
  grid-template-columns: 70px 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.tech-item span {
  color: var(--muted);
  font-size: .8rem;
}

.tech-item strong {
  font-family: "Space Grotesk";
  font-size: 1.3rem;
}

.tech-item small {
  color: var(--muted);
  text-align: right;
}

/* ==============================
   FORMACIÓN
   ============================== */

.formation {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.formation-main {
  display: flex;
  align-items: center;
  gap: 24px;
}

.formation-badge {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid rgba(94,231,209,.4);
  color: var(--accent);
  font-weight: 800;
}

.formation h3 {
  font-family: "Space Grotesk";
  font-size: 1.3rem;
}

.formation p {
  color: var(--muted);
  margin-top: 6px;
}

.formation-side {
  text-align: right;
  display: grid;
  align-content: center;
}

.formation-side span {
  color: var(--muted);
  font-size: .8rem;
}

.formation-side strong {
  color: var(--accent);
}

/* ==============================
   CONTACTO
   ============================== */

.contact-box {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  border-top: 1px solid var(--line);
  padding-top: 60px;
}

.contact-box h2 {
  font-family: "Space Grotesk";
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
  max-width: 700px;
  margin: 12px 0 18px;
}

.contact-box p:not(.section-tag) {
  color: var(--muted);
  max-width: 650px;
}

/* ==============================
   PIE DE PÁGINA
   ============================== */

.site-footer {
  padding: 35px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  font-size: .82rem;
}

.footer-inner strong {
  color: var(--text);
  letter-spacing: .08em;
  font-size: .78rem;
}

.footer-inner p {
  margin-top: 5px;
}

/* ==============================
   BOTÓN VOLVER ARRIBA
   ============================== */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ==============================
   TABLETS
   ============================== */

@media (max-width: 900px) {

  .hero {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }

  .hero-text {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-card {
    min-height: 330px;
    width: min(330px, 75vw);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .formation {
    flex-direction: column;
  }

  .formation-side {
    text-align: left;
  }
}

/* ==============================
   CELULARES
   ============================== */

@media (max-width: 720px) {

  .container {
    width: min(100% - 28px, var(--max));
  }

  .navbar {
    min-height: 70px;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 10;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    background: rgba(7,16,29,.98);
    border: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
  }

  .nav-menu.open {
    display: flex;
  }

  .hero {
    padding-top: 45px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .hero-card {
    min-height: 270px;
    width: 270px;
  }

  .section {
    padding: 80px 0;
  }

  .tech-item {
    grid-template-columns: 45px 1fr;
  }

  .tech-item small {
    grid-column: 2;
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
  }

  .contact-box {
    align-items: flex-start;
    flex-direction: column;
  }
}