/* ------------------------------------------------------------------
   erickuribe.com — retro CRT phosphor terminal
   Plain CSS. No build step, no dependencies, no external fonts.
   ------------------------------------------------------------------ */

:root {
  --bg:        #070b08;
  --bg-panel:  #0c120e;
  --bg-raise:  #101711;

  --green:     #4dffa6;  /* primary phosphor */
  --green-dim: #2fbf7a;  /* borders, rules */
  --green-mut: #8fbfa4;  /* body copy — still ~7:1 on --bg */
  --amber:     #ffc857;  /* highlights, "the good part" */
  --red:       #ff6b6b;  /* failure states in war stories */

  --edge:      #1d2f24;
  --glow:      0 0 6px rgba(77, 255, 166, 0.35);

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco,
          "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  --wrap: 62rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: #070b08; /* belt-and-braces: no flash of white before CSS vars resolve */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--green-mut);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

/* Scanline + vignette overlay. Purely decorative, never intercepts clicks. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0)    0px,
      rgba(0, 0, 0, 0)    2px,
      rgba(0, 0, 0, 0.22) 3px,
      rgba(0, 0, 0, 0.22) 4px
    ),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--green-dim);
}
a:hover, a:focus-visible {
  background: var(--green);
  color: var(--bg);
  border-bottom-color: var(--green);
}
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Skip link for keyboard users */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  z-index: 10000;
  background: var(--green);
  color: var(--bg);
  padding: 0.5rem 1rem;
}

/* ---------------------------------------------------------------- HEADER */

header {
  border-bottom: 1px solid var(--edge);
  padding: 2.5rem 0 2rem;
}

.statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.75rem;
  color: var(--green-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 2rem;
}
.statusbar .live { color: var(--green); }
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: var(--glow);
  margin-right: 0.4rem;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.masthead {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* The Erick cartoon, reused from the Pencreus boot splash. It's 1-bit black
   line art, so we alpha-mask it and paint the phosphor green through it —
   that way it always matches --green with no second copy of the file. */
.mark {
  width: 108px;
  aspect-ratio: 600 / 800;
  flex: none;
  background-color: var(--green);
  -webkit-mask: url(assets/erick.svg) center / contain no-repeat;
          mask: url(assets/erick.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(77, 255, 166, 0.3));
}

h1 {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  line-height: 1.05;
  margin: 0;
  color: var(--green);
  letter-spacing: -0.02em;
  text-shadow: var(--glow);
}

.tagline {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--green-mut);
  max-width: 36ch;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--green);
  vertical-align: text-bottom;
  margin-left: 0.15em;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------------------------------------------------------------- LAYOUT */

section { padding: 3.25rem 0; border-bottom: 1px solid var(--edge); }

h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--green-dim);
  margin: 0 0 1.75rem;
  font-weight: 500;
}
h2::before { content: "── "; }

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--green);
  font-weight: 600;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

code {
  font-family: inherit;
  color: var(--amber);
  background: rgba(255, 200, 87, 0.08);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}

/* ------------------------------------------------------------- LEAD STAT */

.lead {
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  line-height: 1.4;
  color: var(--green-mut);
  max-width: 36ch;
  margin: 0;
}
.lead strong { color: var(--green); font-weight: 600; }

/* ------------------------------------------------------------- WAR STORY */

.featured {
  background: var(--bg-panel);
  border: 1px solid var(--green-dim);
  padding: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
}
.featured::after {
  content: "FEATURED";
  position: absolute;
  top: -0.6rem; right: 1.25rem;
  background: var(--bg);
  padding: 0 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--amber);
}

.trace {
  background: var(--bg);
  border-left: 2px solid var(--edge);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
  white-space: pre;
  color: var(--green-mut);
}
.trace .bad  { color: var(--red); }
.trace .good { color: var(--green); }
.trace .key  { color: var(--amber); }

/* ---------------------------------------------------------------- BUILDS */

.builds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.build {
  background: var(--bg-panel);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.build:hover { background: var(--bg-raise); }

.build .meta {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dim);
}
.build p { font-size: 0.88rem; margin: 0; }
.build .hw {
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.72rem;
  color: var(--green-dim);
  border-top: 1px dashed var(--edge);
}

.badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--green-dim);
  color: var(--green);
  margin-left: 0.4rem;
  vertical-align: 1px;
}
.badge.fork { color: var(--amber); border-color: var(--amber); }

/* ------------------------------------------------------------ PLAIN LIST */

.rack { list-style: none; margin: 0; padding: 0; }
.rack li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--edge);
  font-size: 0.88rem;
}
.rack li:last-child { border-bottom: 0; }
.rack .name { color: var(--green); min-width: 13rem; flex: none; }

/* ---------------------------------------------------------------- SKILLS */

/* ------------------------------------------------------------ BACKGROUND */

.role {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px dashed var(--edge);
}
.role:last-child { border-bottom: 0; }

.role .when {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dim);
  padding-top: 0.28rem;
}
.role h3 { margin-bottom: 0.35rem; }
.role .org {
  color: var(--green-mut);
  font-weight: 400;
  font-size: 0.9rem;
  white-space: nowrap;
}
.role p { font-size: 0.9rem; margin: 0; }
.role strong { color: var(--amber); font-weight: 600; }

/* Unwritten content, marked loudly so it can't ship by accident. */
.todo {
  color: var(--red);
  border: 1px dashed var(--red);
  padding: 0.6rem 0.8rem;
}
.todo::before {
  content: "TODO — ";
  letter-spacing: 0.1em;
  font-size: 0.85em;
}

@media (max-width: 40rem) {
  .role { grid-template-columns: 1fr; gap: 0.4rem; }
  .role .org { white-space: normal; display: block; }
}

/* ---------------------------------------------------------------- SKILLS */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
}
.cols ul { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.cols li { padding: 0.25rem 0; }
.cols li::before { content: "▸ "; color: var(--green-dim); }

/* --------------------------------------------------------------- CONTACT */

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-size: 1rem;
  align-items: baseline;
}
.fineprint {
  font-size: 0.8rem;
  margin-top: 1.25rem;
  color: var(--green-dim);
  max-width: 46ch;
}

/* Loud marker so an unfilled profile URL can't ship by accident. */
a[data-todo][href=""] {
  color: var(--red);
  border-color: var(--red);
  border-style: dashed;
}
a[data-todo][href=""]::after {
  content: " ← set URL";
  font-size: 0.72em;
  letter-spacing: 0.08em;
}
a[data-todo][href=""]:hover { background: var(--red); color: var(--bg); }

footer {
  padding: 2rem 0 3rem;
  font-size: 0.72rem;
  color: var(--green-dim);
  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------ RESPONSIVE */

@media (max-width: 34rem) {
  .masthead { gap: 1.25rem; }
  .mark { width: 72px; }
  .rack .name { min-width: 100%; }
  section { padding: 2.5rem 0; }
}

/* --------------------------------------------------- MOTION / PRINT / A11Y */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .cursor { visibility: visible; }
}

@media print {
  body::before { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  h1, h2, h3, .mark { color: #000; text-shadow: none; filter: none; }
  .featured, .build, .trace { border-color: #999; background: #fff; }
}
