/* Thyler Solutions Lab — sitio estático. Diseño heredado de la landing original (oscuro, acento verde/violeta). */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); }

:root {
  --bg: #05070a; --bg2: #0a0f16; --line: #16202c; --line2: #22303f;
  --text: #e6ecf5; --muted: #9aa8bb; --dim: #6f7f94;
  --accent: #28f2c0; --accent2: #7d5bff; --accent-soft: #28f2c033;
  --radius: 14px; --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dfada; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #04120d; padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { left: 12px; }

/* fondo */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--bg); }
.bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: brightness(.75) contrast(1.05); }
.bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 35%, #05070a80 0%, #05070ae6 60%, #05070afa 100%); }
.grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(#1b2735 1px, transparent 1px), linear-gradient(90deg, #1b2735 1px, transparent 1px); background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%); }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; animation: glow 9s ease-in-out infinite alternate;
  background: radial-gradient(600px 420px at 18% 8%, #28f2c01f, transparent 70%), radial-gradient(680px 460px at 84% 22%, #7d5bff1f, transparent 70%); }
@keyframes glow { from { transform: translateX(-3%) scale(1); opacity: .75; } to { transform: translateX(3%) scale(1.08); opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 #28f2c066; } 50% { opacity: .55; box-shadow: 0 0 0 6px #28f2c000; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.wrap { position: relative; z-index: 1; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* header */
header.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: #05070ad9; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; max-width: var(--max); margin: 0 auto; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: .02em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { display: block; font-weight: 400; color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
nav.main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
nav.main a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 14px; }
nav.main a:hover { color: var(--text); background: #ffffff0a; }
nav.main a.cta { color: var(--text); border: 1px solid var(--line2); }
nav.main a.cta:hover { border-color: var(--accent); color: var(--accent); }
.lang { display: flex; gap: 2px; font-size: 12px; border: 1px solid var(--line2); border-radius: 8px; padding: 2px; margin-left: 6px; }
.lang a { color: var(--muted); padding: 5px 9px; border-radius: 6px; }
.lang a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

/* hero */
.hero { padding: 140px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s infinite; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.05; margin: 22px 0 18px; letter-spacing: -.02em; font-weight: 700; }
h1 .grad { background: linear-gradient(90deg, #28f2c0, #4aa8ff 55%, #7d5bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 34em; margin: 0 0 28px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid var(--line2); color: var(--text); background: #ffffff05; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, #28f2c0, #2fd6c8); color: #04120d; border-color: transparent; }
.btn.primary:hover { color: #04120d; filter: brightness(1.08); }
.meta { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 30px 0 0; padding: 0; list-style: none; color: var(--dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.portrait { position: relative; isolation: isolate; border-radius: 18px; border: 1px solid var(--line2); box-shadow: 0 30px 80px #000a; }
.portrait img { display: block; border-radius: 17px; width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 53% 20%; }
.portrait figcaption { position: absolute; left: 14px; bottom: 14px; background: #05070acc; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--text); backdrop-filter: blur(6px); }
.portrait figcaption i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; }

/* secciones */
section { padding: 72px 0; border-top: 1px solid var(--line); }
.eyebrow { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: 13px; letter-spacing: .1em; margin-bottom: 10px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.015em; }
.sub { color: var(--muted); max-width: 46em; margin: 0 0 34px; }
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.about p { color: var(--muted); margin: 0 0 14px; }
.facts { border: 1px solid var(--line2); border-radius: var(--radius); background: #0a0f16b3; padding: 8px 22px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--dim); font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; align-self: center; }
.facts dd { margin: 0; text-align: right; }
.note { margin-top: 22px; border-left: 3px solid var(--accent2); background: #7d5bff14; padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); font-size: 14px; }
.note strong { color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { border: 1px solid var(--line2); border-radius: var(--radius); background: #0a0f16b3; padding: 22px; transition: border-color .2s, transform .2s; }
.card:hover { border-color: #28f2c066; transform: translateY(-2px); }
.card .n { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: 12px; margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proj { border: 1px solid var(--line2); border-radius: var(--radius); background: #0a0f16b3; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.proj .tag { align-self: flex-start; font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line2); border-radius: 999px; padding: 4px 10px; color: var(--muted); }
.proj .tag.own { color: var(--accent); border-color: #28f2c055; }
.proj .tag.client { color: #a9b8ff; border-color: #7d5bff66; }
.proj h3 { margin: 0; font-size: 1.25rem; }
.proj p { margin: 0; color: var(--muted); font-size: 14.5px; }
.proj ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.proj li { margin: 4px 0; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.stack span { font-family: "JetBrains Mono", monospace; font-size: 11.5px; background: #ffffff0a; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--muted); }
.proj .foot { font-size: 13px; color: var(--dim); }
.proj .foot a { display: inline-block; padding: 12px 0; font-size: 14px; } /* objetivo táctil >= 44 px */

.techstrip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.techstrip span { font-family: "JetBrains Mono", monospace; font-size: 12.5px; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 12px; color: var(--muted); background: #0a0f16b3; }

.contact { text-align: center; }
.contact .sub { margin-left: auto; margin-right: auto; }
.mail { display: inline-block; font-size: clamp(1.15rem, 3vw, 1.7rem); font-weight: 600; margin: 4px 0 22px; }
.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

footer.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--dim); font-size: 13px; }
footer.foot .row { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
footer.foot p { margin: 0 0 6px; }

/* selector de idioma (raíz) */
.picker { min-height: 100vh; display: flex; align-items: center; }
.picker .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.choice { display: block; border: 1px solid var(--line2); border-radius: 16px; background: #0a0f16b3; padding: 30px; color: var(--text); transition: border-color .2s, transform .2s; }
.choice:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.choice .flag { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: 12px; letter-spacing: .1em; }
.choice h2 { font-size: 1.6rem; margin: 10px 0 8px; }
.choice p { color: var(--muted); margin: 0; font-size: 15px; }

@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero-grid, .about { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr; }
  .portrait { order: -1; max-width: 520px; }
  section { padding: 52px 0; }
}
@media (max-width: 560px) {
  .bar { padding: 10px 16px; }
  nav.main a { padding: 6px 8px; font-size: 13px; }
  .cards { grid-template-columns: 1fr; }
  .picker .choices { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}

/* ── Fichas vivas (interacción) ── */
.card, .proj { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .28s ease, border-color .2s, box-shadow .25s, opacity .7s ease, translate .7s ease; transition-delay: 0s, 0s, 0s, var(--d, 0s), var(--d, 0s); }
.card::after, .proj::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), #28f2c026, transparent 60%); }
.card:hover, .proj:hover, .card.active, .proj.active { border-color: #28f2c066; box-shadow: 0 18px 50px #0009, 0 0 0 1px #28f2c01a inset; }
.card:hover::after, .proj:hover::after, .card.active::after, .proj.active::after { opacity: 1; }
.card:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px); }
.proj:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px); }
.proj .stack span { transition: border-color .2s, color .2s, background .2s; }
.proj:hover .stack span, .proj.active .stack span { border-color: #28f2c044; color: var(--text); }
.card .n { transition: transform .25s; }
.card:hover .n { transform: translateX(4px); }
.js .reveal { opacity: 0; translate: 0 26px; }
.js .reveal.in { opacity: 1; translate: 0 0; }
nav.main a.here:not(.cta) { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .card, .proj { transform: none !important; } .js .reveal { opacity: 1; translate: none; } }
/* ── Nombre en portada e iconos de tecnología ── */
.who { display: flex; flex-direction: column; gap: 4px; margin: 22px 0 0; padding-left: 14px; border-left: 3px solid var(--accent); }
.who .nm { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: clamp(1.05rem, 2.3vw, 1.6rem); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; color: var(--accent); }
.who .rl { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.who + h1 { margin-top: 18px; }
.stack span, .techstrip span { display: inline-flex; align-items: center; gap: 7px; }
.stack .ti, .techstrip .ti { flex: none; }
.stack span { padding: 5px 10px; font-size: 12px; }
.proj:hover .stack .ti, .proj.active .stack .ti { filter: drop-shadow(0 0 5px currentColor); }

/* ── Botón de descarga del CV ── */
.btn.cv { display: inline-flex; align-items: center; gap: 8px; }
.btn.cv .dl { flex: none; transition: transform .2s; }
.btn.cv:hover .dl { transform: translateY(2px); }

/* ── Resplandor tipo aurora detrás del retrato ── */
.portrait::before, .portrait::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; }
.portrait::before { inset: -14% -16% -12% -16%; filter: blur(46px); opacity: .85;
  background: radial-gradient(46% 42% at 26% 30%, #28f2c0 0%, #28f2c000 70%), radial-gradient(44% 44% at 78% 24%, #4aa8ff 0%, #4aa8ff00 72%),
              radial-gradient(52% 46% at 62% 82%, #7d5bff 0%, #7d5bff00 72%);
  animation: aurora 16s ease-in-out infinite alternate; }
.portrait::after { inset: -3px; border-radius: 21px; filter: blur(10px); opacity: .55;
  background: linear-gradient(135deg, #28f2c0, #4aa8ff 50%, #7d5bff); animation: auroraPulse 6s ease-in-out infinite alternate; }
@keyframes aurora { 0% { transform: translate3d(-3%, 2%, 0) rotate(-4deg) scale(1); } 100% { transform: translate3d(3%, -3%, 0) rotate(5deg) scale(1.08); } }
@keyframes auroraPulse { from { opacity: .35; } to { opacity: .7; } }
.hero { overflow-x: clip; }
@media (max-width: 560px) { .portrait::before { inset: -8% -6%; filter: blur(34px); } .portrait::after { inset: -2%; } }
@media (prefers-reduced-motion: reduce) { .portrait::before, .portrait::after { animation: none !important; } }
