/* ============ MARCELO GARCÍA — FOUNDING ENGINEER PORTFOLIO ============ */
/* Design: dark cinema, electric gradient accents, big type, film grain  */

:root {
  --bg: #06070b;
  --bg-2: #0b0d14;
  --bg-3: #10131d;
  --panel: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef1f8;
  --muted: #99a1b3;
  --dim: #5c6373;
  --acc: #7c6cff;      /* electric violet */
  --acc-2: #22d3ee;    /* cyan */
  --acc-3: #34e39b;    /* mint */
  --hot: #ff5d73;      /* alert pink */
  --gold: #ffc84d;
  --grad: linear-gradient(100deg, #7c6cff 0%, #22d3ee 55%, #34e39b 100%);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --rail: clamp(16px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 108, 255, 0.45); color: #fff; }

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

a { color: inherit; }

h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.02em; }

.mono { font-family: var(--font-mono); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- boot loader ---------- */
#boot {
  position: fixed; inset: 0; z-index: 3000;
  background: #04050a;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(680px, 88vw); font-family: var(--font-mono); font-size: clamp(12px, 1.6vw, 15px); }
.boot-line { color: var(--muted); white-space: pre-wrap; min-height: 1.6em; }
.boot-line .ok { color: var(--acc-3); }
.boot-line .cmd { color: var(--acc-2); }
.boot-caret { display: inline-block; width: 8px; height: 1.1em; background: var(--acc-2); vertical-align: text-bottom; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#boot-skip {
  position: absolute; bottom: 28px; right: 32px;
  background: none; border: 1px solid var(--line); color: var(--dim);
  font-family: var(--font-mono); font-size: 12px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
#boot-skip:hover { color: var(--text); border-color: var(--muted); }

/* ---------- nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--rail);
  background: rgba(6, 7, 11, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
nav.scrolled { border-color: var(--line); }
.nav-name { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.nav-name b { color: var(--text); }
.nav-links { display: flex; gap: 22px; font-size: 13.5px; color: var(--muted); }
.nav-links a { text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 720px) { .nav-links { display: none; } }
.nav-cta {
  font-size: 13px; text-decoration: none; padding: 8px 16px; border-radius: 999px;
  background: var(--grad); color: #05060a; font-weight: 700;
}

/* ---------- hero ---------- */
header {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--rail) 80px;
  overflow: clip;
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; pointer-events: none; }
.orb-1 { width: 520px; height: 520px; background: #4534d8; top: -140px; right: -80px; animation: drift 14s ease-in-out infinite alternate; }
.orb-2 { width: 420px; height: 420px; background: #0e7490; bottom: -160px; left: -120px; animation: drift 18s ease-in-out infinite alternate-reverse; }
.orb-3 { width: 260px; height: 260px; background: #831843; top: 40%; left: 55%; opacity: 0.35; animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 50px) scale(1.15); }
}
.hero-kicker {
  font-family: var(--font-mono); font-size: clamp(12px, 1.5vw, 15px); color: var(--acc-2);
  margin-bottom: 22px; display: flex; align-items: center; gap: 10px;
}
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--acc-2); display: inline-block; }
h1 {
  font-size: clamp(44px, 9.2vw, 124px);
  line-height: 0.98;
  font-weight: 700;
  text-wrap: balance;
}
h1 .row { display: block; overflow: hidden; }
h1 .row span { display: inline-block; transform: translateY(110%); animation: rise 0.9s cubic-bezier(0.2, 0.65, 0.2, 1) forwards; }
h1 .row:nth-child(2) span { animation-delay: 0.12s; }
h1 .row:nth-child(3) span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }
.hero-sub {
  max-width: 720px; margin-top: 30px; font-size: clamp(16px, 2vw, 21px); color: var(--muted);
}
.hero-sub b { color: var(--text); font-weight: 600; }
.hero-ctas { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.btn {
  text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--grad); color: #05060a; box-shadow: 0 8px 40px rgba(124, 108, 255, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(34, 211, 238, 0.4); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--acc-2); color: var(--acc-2); }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.2em;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap; padding: 16px 0;
  background: var(--bg-2);
}
.marquee-track { display: inline-block; animation: scrollx 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(-50%); } }
.marquee span {
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  margin: 0 26px;
}
.marquee span::after { content: "✦"; color: var(--acc); margin-left: 52px; }

/* ---------- sections ---------- */
section { padding: clamp(80px, 12vh, 140px) var(--rail); position: relative; }
.sec-kicker {
  font-family: var(--font-mono); font-size: 13px; color: var(--acc-2);
  text-transform: uppercase; letter-spacing: 0.25em; margin-bottom: 18px;
}
.sec-title { font-size: clamp(32px, 5.4vw, 64px); line-height: 1.04; margin-bottom: 18px; text-wrap: balance; }
.sec-lede { max-width: 780px; color: var(--muted); font-size: clamp(16px, 1.9vw, 19px); }
.sec-lede b, .sec-lede strong { color: var(--text); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.65, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ---------- stat counters ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; margin-top: 56px;
}
.stat { background: var(--bg-2); padding: 30px 26px; }
.stat .num { font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); font-weight: 700; }
.stat .lbl { font-size: 13px; color: var(--dim); margin-top: 6px; line-height: 1.45; }

/* ---------- career cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 54px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px; position: relative; overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(124, 108, 255, 0.5); background: rgba(124, 108, 255, 0.05); }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card .role { font-family: var(--font-mono); font-size: 12px; color: var(--acc-2); text-transform: uppercase; letter-spacing: 0.14em; }
.card h3 { font-size: 22px; margin: 10px 0 4px; }
.card .when { font-size: 12.5px; color: var(--dim); font-family: var(--font-mono); margin-bottom: 14px; }
.card p { font-size: 15px; color: var(--muted); }
.card .hit { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--acc-3);
  border: 1px solid rgba(52, 227, 155, 0.25); background: rgba(52, 227, 155, 0.06);
  padding: 4px 10px; border-radius: 999px;
}
.chip.violet { color: #b5aaff; border-color: rgba(124, 108, 255, 0.3); background: rgba(124, 108, 255, 0.07); }
.chip.gold { color: var(--gold); border-color: rgba(255, 200, 77, 0.25); background: rgba(255, 200, 77, 0.06); }

/* ---------- machine room (horizontal gallery) ---------- */
#machines { padding-left: 0; padding-right: 0; }
#machines .sec-head { padding: 0 var(--rail); }
.hscroll-wrap { position: relative; margin-top: 60px; }
.hscroll {
  display: flex; gap: 26px; overflow-x: auto; padding: 10px var(--rail) 30px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 min(820px, 86vw); scroll-snap-align: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; position: relative;
  transition: border-color 0.3s;
}
.shot:hover { border-color: rgba(34, 211, 238, 0.5); }
.shot img { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; object-position: top; }
.shot figcaption { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.shot .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--acc-2); }
.shot h3 { font-size: 20px; margin: 8px 0 6px; }
.shot p { font-size: 14.5px; color: var(--muted); }
.hint {
  text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--dim);
  margin-top: 4px; letter-spacing: 0.12em;
}

/* text-only project tiles */
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 50px var(--rail) 0; }
.mini {
  border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  background: var(--panel); transition: transform 0.25s, border-color 0.25s;
}
.mini:hover { transform: translateY(-4px); border-color: rgba(52, 227, 155, 0.45); }
.mini .t { font-family: var(--font-mono); font-size: 13px; color: var(--acc-3); margin-bottom: 8px; }
.mini p { font-size: 13.5px; color: var(--muted); }

/* ---------- terminal ---------- */
.term {
  background: #05060b; border: 1px solid var(--line); border-radius: 16px;
  margin-top: 50px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.term-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-left: 10px; }
.term pre {
  padding: 22px 24px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75;
  color: #c6cede; overflow-x: auto; white-space: pre;
}
.term .c-k { color: #7c6cff; } /* keyword */
.term .c-s { color: #34e39b; } /* string */
.term .c-f { color: #22d3ee; } /* fn */
.term .c-c { color: #545d70; } /* comment */

/* ---------- why-fit checklist ---------- */
.fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 54px; }
.fit-item {
  display: flex; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.fit-item .check {
  flex: 0 0 30px; height: 30px; border-radius: 50%; background: rgba(52, 227, 155, 0.12);
  color: var(--acc-3); display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.fit-item h4 { font-size: 16.5px; margin-bottom: 6px; }
.fit-item p { font-size: 14px; color: var(--muted); }

/* ---------- contact ---------- */
#contact { text-align: center; padding-bottom: 60px; }
#contact .sec-title { font-size: clamp(40px, 7vw, 92px); }
.contact-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.ps {
  max-width: 640px; margin: 70px auto 0; font-size: 14px; color: var(--dim);
  border: 1px dashed var(--line); padding: 20px 26px; border-radius: 14px; font-family: var(--font-mono); line-height: 1.7;
}
.ps b { color: var(--acc-2); font-weight: 500; }
footer { padding: 30px var(--rail); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--dim); font-family: var(--font-mono); }

/* ---------- headshot / about strip ---------- */
.about {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  margin-top: 40px; padding: 24px 28px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--panel);
}
.avatar {
  flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%;
  padding: 3px; background: var(--grad);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; background: var(--bg-3); object-fit: cover; }
.about-txt { flex: 1; min-width: 240px; }
.about-txt .nm { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.about-txt .rl { font-size: 14.5px; color: var(--muted); margin-top: 3px; }
.about-txt .loc { font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-top: 8px; }

/* ---------- company logo row ---------- */
.logos-band { margin-top: 30px; }
.logos-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.logos {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px;
}
.logos img {
  height: 28px; width: auto; max-width: 140px; object-fit: contain;
  opacity: 0.78; filter: brightness(0) invert(0.72);
  transition: opacity 0.25s, filter 0.25s;
}
.logos img:hover { opacity: 1; filter: none; }
@media (max-width: 640px) { .logos img { height: 24px; } }

/* ---------- featured real-product block (ChatBet) ---------- */
.feature {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 30px; align-items: center;
  margin-top: 40px; padding: 34px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(180deg, rgba(124,108,255,0.06), rgba(255,255,255,0.01));
}
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }
.feature .f-left .brandrow { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.feature .f-left .brandrow img { height: 30px; width: auto; }
.feature .f-left .brandrow .badge {
  font-family: var(--font-mono); font-size: 11px; color: var(--acc-3);
  border: 1px solid rgba(52,227,155,0.3); border-radius: 999px; padding: 3px 10px;
}
.feature h3 { font-size: clamp(22px,2.6vw,28px); margin-bottom: 12px; line-height: 1.15; }
.feature p { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.feature .fchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.feature .flink { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--acc-2); text-decoration: none; border-bottom: 1px solid rgba(34,211,238,0.4); padding-bottom: 2px; }
.feature .flink:hover { color: var(--text); }
.proofcard {
  background: #f4f5fb; border-radius: 18px; padding: 22px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.proofcard img { width: 100%; max-width: 380px; height: auto; }
.proofcard .src { display: block; margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; color: #8a8fa6; }

/* ---------- compact project list (replaces big gallery) ---------- */
.plist { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 50px; }
@media (max-width: 780px) { .plist { grid-template-columns: 1fr; } }
.prow {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); text-decoration: none; color: inherit;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.prow:hover { border-color: rgba(124,108,255,0.5); background: rgba(124,108,255,0.05); transform: translateY(-3px); }
.prow .ic {
  width: 52px; height: 52px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-3); flex: 0 0 auto;
}
.prow .ic img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.prow .ic.emoji { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.prow .bd h3 { font-size: 16px; margin: 0 0 3px; font-family: var(--font-display); }
.prow .bd p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.prow .bd .tech { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin-top: 5px; letter-spacing: 0.03em; }
.prow .metric { text-align: right; flex: 0 0 auto; }
.prow .metric b { font-family: var(--font-display); font-size: 20px; font-weight: 700; display: block; line-height: 1; }
.prow .metric span { font-size: 10.5px; color: var(--dim); font-family: var(--font-mono); }
@media (max-width: 480px) { .prow { grid-template-columns: 44px 1fr; } .prow .metric { display: none; } .prow .ic { width: 44px; height: 44px; } }

/* small thumbnail popover strip under list */
.proof {
  margin-top: 22px; display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin;
}
.proof img {
  height: 128px; width: auto; border-radius: 10px; border: 1px solid var(--line);
  flex: 0 0 auto; opacity: 0.85; transition: opacity 0.25s, transform 0.25s;
}
.proof img:hover { opacity: 1; transform: scale(1.03); }

/* ---------- my story ---------- */
.story-wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: start; margin-top: 30px; }
@media (max-width: 860px) { .story-wrap { grid-template-columns: 1fr; gap: 30px; } }
.story-body p { font-size: 16.5px; color: var(--muted); margin-bottom: 16px; }
.story-body p b { color: var(--text); font-weight: 600; }
.pullquote {
  font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 34px); font-weight: 700;
  line-height: 1.15; margin: 26px 0 6px; text-wrap: balance;
}
.story-media { position: sticky; top: 90px; }
.portrait {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 34px 30px;
  border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(180deg, rgba(124,108,255,0.08), rgba(34,211,238,0.03));
}
.portrait-ring { width: 260px; height: 260px; border-radius: 50%; padding: 5px; background: var(--grad); }
.portrait-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; display: block; }
.portrait-cap { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .portrait-ring { width: 220px; height: 220px; } }

/* WhatsApp button accent */
.btn-wa { background: linear-gradient(100deg,#25D366,#1ebe5a); color: #05210f; box-shadow: 0 8px 40px rgba(37,211,102,0.3); }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(37,211,102,0.42); }
.nav-cta.wa { background: linear-gradient(100deg,#25D366,#1ebe5a); color: #05210f; }
.wa-ico { width: 17px; height: 17px; vertical-align: -3px; margin-right: 7px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
