/* =========================================================================
   Andrés Menor — portfolio theme
   Dark, engineering-flavoured layer on top of Bootstrap.
   ========================================================================= */

:root {
  --bg: #070b16;
  --bg-2: #0b1220;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e8eef9;
  --muted: rgba(232, 238, 249, 0.62);
  --muted-2: rgba(232, 238, 249, 0.40);
  --accent: #3b82f6;
  --accent-2: #14b8a6;
  --accent-3: #8b5cf6;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1000px circle at 15% -10%, rgba(59, 130, 246, 0.07), transparent 50%),
    radial-gradient(800px circle at 92% 4%, rgba(20, 184, 166, 0.05), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #6ea8fe; }

::selection { background: rgba(59, 130, 246, 0.35); }

/* --- Typography helpers --------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}
.text-muted-2 { color: var(--muted) !important; }
.text-muted-3 { color: var(--muted-2) !important; }
.text-grad {
  color: #f3f7fd;
}
.display-hero {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
}
.section { padding: 5rem 0; }
.section-sm { padding: 3.5rem 0; }
.divider { height: 1px; background: var(--border); border: 0; }

/* --- Navbar --------------------------------------------------------------- */
.site-nav {
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.brand-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
  margin-right: 0.55rem;
  vertical-align: middle;
}
.navbar-brand { color: var(--text) !important; font-weight: 700; letter-spacing: 0.2px; }
.site-nav .nav-link { color: var(--muted) !important; font-size: 0.95rem; padding: 0.4rem 0.85rem; }
.site-nav .nav-link:hover { color: var(--text) !important; }
.site-nav .nav-link.active { color: var(--text) !important; font-weight: 600; }
.lang-switch {
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--muted) !important;
}
.lang-switch:hover { color: var(--text) !important; border-color: var(--accent); }

/* --- Buttons -------------------------------------------------------------- */
.btn-accent {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  border: 0;
  color: #06121f;
  font-weight: 600;
}
.btn-accent:hover { filter: brightness(1.08); color: #06121f; }
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
  font-weight: 500;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: var(--surface-2); }

/* --- Cards & surfaces ----------------------------------------------------- */
.glass {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(3px);
}
.card-elev {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card-elev:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* --- Badges / chips ------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
}
.chip-sm { font-size: 0.72rem; padding: 0.22rem 0.6rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tag-eng { background: rgba(59,130,246,0.15); color: #9ec5fe; border-color: rgba(59,130,246,0.4); }
.tag-sci { background: rgba(20,184,166,0.15); color: #5eead4; border-color: rgba(20,184,166,0.4); }
.tag-ana { background: rgba(139,92,246,0.15); color: #c4b5fd; border-color: rgba(139,92,246,0.4); }
.badge-available {
  background: rgba(20, 184, 166, 0.14);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.4);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 0.3rem 0.8rem;
}
.badge-available::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5eead4;
  margin-right: 0.4rem;
  box-shadow: 0 0 8px #5eead4;
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* --- Stats ---------------------------------------------------------------- */
.stat-value {
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #5eead4;
  line-height: 1;
}
.stat-label { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

/* --- Section heads -------------------------------------------------------- */
.section-title { font-weight: 800; letter-spacing: -0.01em; }

/* --- Pipeline diagram (showcase) ----------------------------------------- */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.pstage {
  flex: 1 1 150px;
  min-width: 150px;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1rem;
}
.pstage .pstage-idx {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-2);
}
.pstage .pstage-name { font-weight: 700; margin: 0.2rem 0 0.25rem; font-size: 0.98rem; }
.pstage .pstage-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.pstage::after {
  content: "→";
  position: absolute;
  right: -0.62rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-weight: 700;
  z-index: 2;
}
.pstage:last-child::after { content: ""; }
@media (max-width: 575.98px) {
  .pstage::after {
    content: "↓";
    right: 50%;
    top: auto;
    bottom: -0.95rem;
    transform: translateX(50%);
  }
}
.pipeline-note {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 0.8rem;
  margin-top: 1.25rem;
}

/* --- Timeline ------------------------------------------------------------- */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}
.tl-item { position: relative; padding-bottom: 1.6rem; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -1.5rem; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-2);
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.6);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* --- Misc ----------------------------------------------------------------- */
.lead-2 { font-size: 1.15rem; color: var(--muted); line-height: 1.6; }
.list-clean { list-style: none; padding-left: 0; }
.list-clean li { position: relative; padding-left: 1.4rem; margin-bottom: 0.6rem; color: var(--muted); }
.list-clean li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-2);
}
.grid-overlay {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 38px 38px;
}
