/* ===== Tokens ===== */
:root{
  --bg-0: #050706;
  --bg-1: #0C1310;
  --line: #1C2A23;
  --line-strong: #29392F;

  --green: #00EB7A;
  --teal: #00F8D2;

  --text: #EAF3EC;
  --text-dim: #9FB3A8;
  --text-faint: #7E9689;

  --font-sans: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale — every font-size in this file resolves to one of these steps. */
  --fs-1: 0.78rem;
  --fs-2: 0.85rem;
  --fs-3: 0.9rem;
  --fs-4: 0.95rem;
  --fs-5: 1rem;
  --fs-6: 1.05rem;
  --fs-7: 1.15rem;
  --fs-command: clamp(1.1rem, 2.2vw, 1.5rem);
  --fs-hero-subtitle: clamp(1.05rem, 1.6vw, 1.2rem);
  --fs-commit-title: clamp(1.15rem, 2vw, 1.4rem);
  --fs-heading: clamp(1.75rem, 3.4vw, 2.5rem);
  --fs-display: clamp(2.25rem, 5.6vw, 4.25rem);

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 10vw, 8rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Reset ===== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto; } }

body{
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-5);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,p{ margin: 0; }

::selection{ background: var(--green); color: var(--bg-0); }

:focus-visible{
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: var(--bg-0);
  padding: .75rem 1.25rem;
  font-family: var(--font-mono);
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus{ left: var(--gutter); top: var(--gutter); }

/* ===== Sitewide particle background ===== */
#particles-js{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--bg-0);
}
#particles-js canvas{ display: block; }

.site-header,
main,
.site-footer{
  position: relative;
  z-index: 1;
}

/* ===== Shared vocabulary ===== */
.prompt-glyph{ color: var(--green); }
.prompt-flag{ color: var(--text-dim); }

.section-command{
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-command);
  color: var(--green);
  letter-spacing: -0.01em;
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
}

.cmd-button{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-5);
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--green);
  padding: .9rem 1.4rem;
  border-radius: 3px;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.cmd-button:hover{
  background: var(--green);
  color: var(--bg-0);
  box-shadow: 0 6px 20px rgba(0,235,122,.28);
}
.cmd-button:hover .prompt-glyph,
.cmd-button:hover .prompt-flag{ color: var(--bg-0); }
.cmd-button--large{ font-size: var(--fs-7); padding: 1.1rem 1.8rem; }

.cursor{
  display: inline-block;
  width: .5em;
  height: 1em;
  background: currentColor;
  margin-left: .1em;
  animation: blink 1.1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce){ .cursor{ animation: none; opacity: .6; } }
@keyframes blink{ 0%,49%{ opacity: 1; } 50%,100%{ opacity: 0; } }

.text-link{
  font-family: var(--font-mono);
  font-size: var(--fs-4);
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.text-link:hover{ color: var(--green); border-color: var(--green); }

/* ===== Header ===== */
.site-header{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.site-header[data-scrolled]{
  background: rgba(5,7,6,.86);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.brand__mark{ height: 28px; width: auto; }
.header-cta{
  font-family: var(--font-mono);
  font-size: var(--fs-3);
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  padding: .5rem .9rem;
  border-radius: 3px;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.header-cta:hover{ border-color: var(--green); color: var(--text); }
@media (max-width: 560px){ .prompt-flag{ display: none; } }

/* ===== Hero ===== */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(5.5rem + var(--gutter)) var(--gutter) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.hero__inner{ max-width: 46rem; }

.boot{
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  color: var(--text-faint);
  margin-bottom: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: calc(4 * 1.4em);
}
.boot__line{
  opacity: 0;
  transform: translateY(2px);
}
.boot__line--ok{ color: var(--green); }
.boot[data-done] .boot__line{
  opacity: 1;
  transform: none;
}

.hero__title{
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 1.4rem;
}

.hero__subtitle{
  font-size: var(--fs-hero-subtitle);
  color: var(--text-dim);
  max-width: 40rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.hero__actions{
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

/* ===== Git log / servicios ===== */
.log{
  padding: var(--section-y) var(--gutter);
  border-bottom: 1px solid var(--line);
}
.log__list{
  max-width: 52rem;
  border-top: 1px solid var(--line);
}
.commit{
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
}
.commit__meta{
  display: flex;
  align-items: baseline;
  gap: .9rem;
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  color: var(--text-faint);
  margin-bottom: .8rem;
}
.commit__hash{ color: var(--teal); }
.commit__title{
  font-size: var(--fs-commit-title);
  font-weight: 600;
  margin-bottom: .6rem;
  letter-spacing: -0.01em;
}
.commit__body{
  color: var(--text-dim);
  max-width: var(--measure);
  line-height: 1.65;
}

/* ===== Pipeline ===== */
.pipeline{
  padding: var(--section-y) var(--gutter);
  border-bottom: 1px solid var(--line);
}
.pipeline__stages{
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.pipeline__stages::before{
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-strong);
}
.pipeline__stages::after{
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(var(--pipeline-fill, 0));
  transform-origin: left;
  transition: transform 1.4s var(--ease-out);
}
.stage{
  position: relative;
  padding: 1.75rem 1.25rem 0 0;
}
.stage::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 1.5px solid var(--line-strong);
  transition: border-color .4s var(--ease-out), background-color .4s var(--ease-out);
}
.pipeline__stages[data-filled] .stage::before{
  border-color: var(--green);
  background: var(--green);
}
.stage__index{
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .6rem;
}
.stage--live .stage__index{ color: var(--teal); }
.stage__desc{
  color: var(--text-dim);
  font-size: var(--fs-4);
  line-height: 1.55;
  max-width: 22ch;
}

@media (max-width: 900px){
  .pipeline__stages{ grid-template-columns: 1fr; gap: 2.25rem; }
  .pipeline__stages::before, .pipeline__stages::after{
    top: 0; bottom: 0; left: 6px; right: auto; width: 1px; height: auto;
  }
  .pipeline__stages::after{
    transform: scaleY(var(--pipeline-fill, 0));
    transform-origin: top;
  }
  .stage{ padding: 0 0 0 2.25rem; }
  .stage::before{ top: 4px; left: -1px; }
}

/* ===== Stance ===== */
.stance{
  padding: var(--section-y) var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 19, 16, .72);
}
.stance__inner{ max-width: 44rem; }
.stance__title{
  font-size: var(--fs-heading);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}
.stance__body{
  color: var(--text-dim);
  font-size: var(--fs-6);
  line-height: 1.7;
}

/* ===== Contact ===== */
.contact{
  padding: var(--section-y) var(--gutter);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact .section-command{ margin-bottom: 1rem; }
.contact__lede{
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-size: var(--fs-6);
}

/* ===== Footer ===== */
.site-footer{
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}
.footer__mark{ height: 22px; width: auto; opacity: .85; }
.footer__meta{
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  color: var(--text-faint);
  display: flex;
  gap: .6rem;
}
.footer__social{
  display: flex;
  gap: 1rem;
  margin-left: auto;
}
.social-icon{
  display: inline-flex;
  color: var(--text-faint);
  transition: color .2s var(--ease-out);
}
a.social-icon:hover{ color: var(--green); }
.social-icon--pending{
  opacity: .4;
  cursor: not-allowed;
}
.footer__social svg{ width: 19px; height: 19px; }
.footer__legal{
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--text-faint);
  margin-top: .5rem;
}

@media (max-width: 640px){
  .site-footer{ flex-direction: column; align-items: flex-start; }
  .footer__social{ margin-left: 0; }
}
