/* Juancker — hoja de estilo única, sin build step. */

:root {
  --bg:        #06080d;
  --bg-2:      #0a0e16;
  --surface:   #10151f;
  --surface-2: #161d2a;
  --line:      #1e2736;
  --line-2:    #2a3546;
  --text:      #e9eef7;
  --muted:     #93a3ba;
  --muted-2:   #6b7a90;
  --accent:    #35d6e8;
  --accent-2:  #7c8cff;
  --accent-dim:rgba(53, 214, 232, .12);
  --ok:        #48d597;
  --radius:    14px;
  --maxw:      1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- utilidades ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); opacity: .6;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: 17px; max-width: 62ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #05070c;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,8,13,.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); background: rgba(6,8,13,.9); }
.nav { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 18px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 14.5px; color: var(--muted); font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  background: none; border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 8px; padding: 7px 10px; cursor: pointer; transition: .15s;
}
.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }
.nav-cta { padding: 9px 16px; font-size: 14px; }
.burger { display: none; background: none; border: 0; color: var(--text); padding: 6px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 92px 0 84px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -20% -10% auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(46% 46% at 22% 18%, rgba(53,214,232,.16), transparent 70%),
    radial-gradient(40% 40% at 78% 6%, rgba(124,140,255,.15), transparent 70%);
}
.hero-grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 55% at 50% 30%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 30%, #000 20%, transparent 100%);
}
.hero .wrap { position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
/* los hijos de un grid traen min-width:auto: sin esto el <pre> del bloque de
   código estira la rejilla y en móvil se corta el lado derecho de la página. */
.hero-inner > * { min-width: 0; }
.hero h1, .lede, .card p, .product p, .tl-item p { overflow-wrap: break-word; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); margin: 18px 0 20px; }
.hero .lede { font-size: 18.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px;
  font-size: 13.5px; color: var(--muted-2); font-family: var(--mono);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(72,213,151,.15); }

/* tarjeta de código del hero */
.code-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.8);
}
.code-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 15px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.code-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.code-head span { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.code-body { padding: 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.9; overflow-x: auto; }
.code-body .k { color: var(--accent-2); }
.code-body .s { color: var(--ok); }
.code-body .c { color: var(--muted-2); }
.code-body .f { color: var(--accent); }

/* ---------- barra de logos / stats ---------- */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 30px; letter-spacing: -.03em; }
.stat span { font-size: 13.5px; color: var(--muted); }

/* ---------- secciones ---------- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 16px 0 16px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
  transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent); margin-bottom: 18px;
}
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted-2); font-size: 14px; }
.card li { margin-bottom: 4px; }

/* ---------- productos ---------- */
#productos { background: var(--bg-2); border-block: 1px solid var(--line); }
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.product {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.product:hover { border-color: var(--line-2); transform: translateY(-3px); }
.product::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: .0; transition: opacity .25s;
}
.product:hover::after { opacity: 1; }
.product-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.product h3 { font-size: 21px; }
.product-kicker { font-family: var(--mono); font-size: 12px; color: var(--muted-2); letter-spacing: .05em; margin-top: 4px; }
.badge {
  flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(72,213,151,.35); color: var(--ok); background: rgba(72,213,151,.08);
}
.badge.dev { border-color: rgba(124,140,255,.35); color: var(--accent-2); background: rgba(124,140,255,.08); }
.product p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.tag {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-2);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 9px;
}
.product-link {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: flex; align-items: center; justify-content: flex-start; gap: 7px;
  align-self: stretch;
}
.product-link:hover { gap: 11px; }
.product-link svg { transition: transform .2s; }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stack-col h4 {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.stack-col ul { list-style: none; margin: 0; padding: 0; }
.stack-col li { color: var(--muted); font-size: 14.5px; padding: 5px 0; }

/* ---------- trayectoria ---------- */
#trayectoria { background: var(--bg-2); border-block: 1px solid var(--line); }
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--line) 60%);
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  /* sin la línea de fecha arriba, el punto se alinea con el título del puesto */
  content: ""; position: absolute; left: -34px; top: 4px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--bg-2); border: 2px solid var(--line-2);
}
.tl-item.now::before { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.tl-when { font-family: var(--mono); font-size: 12.5px; color: var(--muted-2); letter-spacing: .04em; }
.tl-item h3 { font-size: 18px; margin: 6px 0 3px; }
.tl-where { color: var(--accent); font-size: 14.5px; font-weight: 500; }
.tl-item p { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 68ch; }

/* ---------- CTA / contacto ---------- */
.contact-inner {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 56px 48px; overflow: hidden;
}
.contact-inner::before {
  content: ""; position: absolute; inset: -60% 40% auto -20%; height: 420px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(53,214,232,.14), transparent 70%);
  pointer-events: none;
}
.contact-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.contact-grid h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 16px 0 14px; }
.contact-list { display: grid; gap: 12px; }
.contact-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
  transition: border-color .18s, transform .18s;
}
.contact-row:hover { border-color: var(--accent); transform: translateX(3px); }
.contact-row svg { flex: none; color: var(--accent); }
.contact-row b { display: block; font-size: 15px; font-weight: 600; }
.contact-row span { font-size: 13px; color: var(--muted-2); font-family: var(--mono); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg-2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted-2); font-size: 14px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }

/* ---------- animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .cards, .products { grid-template-columns: 1fr 1fr; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-inner { padding: 40px 28px; }
}
@media (max-width: 760px) {
  section { padding: 68px 0; }
  .hero { padding: 60px 0 56px; }
  .nav-links {
    position: fixed; inset: 70px 0 auto; flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; margin: 0; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav { gap: 12px; }
  .nav-actions { margin-left: auto; }
  .nav-cta { display: none; }
  .burger { display: block; }
  .cards, .products { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: 0; }
  .stack-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* barras del bloque de código del hero */
.code-body .bar {
  display: inline-block; height: 8px; border-radius: 2px; vertical-align: middle;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .85;
}
