:root {
  --bg: #0a0f1a;
  --bg-raised: #101826;
  --bg-raised-2: #131d2e;
  --border: #1e2a3d;
  --border-soft: #17202f;
  --text: #e6edf5;
  --text-muted: #8b96a5;
  --text-dim: #576177;
  --cyan: #4cd1e0;
  --amber: #f0a84e;
  --green: #6ee7a8;
  --red: #f0715c;

  --mono:
    ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas",
    "Liberation Mono", Menlo, monospace;
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --maxw: 920px;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

::selection {
  background: var(--cyan);
  color: #00131a;
}

a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  margin-top: 2rem;
}

/* subtle grid backdrop */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    #000 20%,
    transparent 75%
  );
  opacity: 0.35;
}

/* =========================================================
   EYEBROW / TERMINAL LABELS
   Cada sección se presenta como si fuera un archivo de log
   consultado por línea de comandos
   ========================================================= */
.cmd {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.cmd::before {
  content: "$";
  color: var(--cyan);
}
.cmd .cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.status {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}
.status--ok {
  color: var(--green);
}
.status--pending {
  color: var(--amber);
}
.status--progress {
  color: var(--cyan);
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-family: var(--mono);
}
.nav-id {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-soft);
    padding: 16px 24px;
    gap: 14px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
}

/* =========================================================
   HERO — boot log
   ========================================================= */
.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--border-soft);
}
.boot {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 28px;
  min-height: 1.6em;
}
.boot span {
  color: var(--text-muted);
}
.boot .ok {
  color: var(--green);
}

h1 {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 700;
}
h1 .accent {
  color: var(--cyan);
}

.role-line {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--amber);
  margin: 0 0 22px;
}
.role-line .sep {
  color: var(--text-dim);
  margin: 0 8px;
}

.lede {
  max-width: 60ch;
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 11px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}
.btn--primary {
  background: var(--cyan);
  color: #00131a;
  border-color: var(--cyan);
  font-weight: 600;
}
.btn--primary:hover {
  background: #6edce9;
}
.btn--ghost {
  color: var(--text-muted);
}
.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* =========================================================
   SECTIONS — shared
   ========================================================= */
section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-soft);
}
section:last-of-type {
  border-bottom: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
h2 {
  font-family: var(--mono);
  font-size: 1.5rem;
  margin: 2rem 0 0;
  letter-spacing: -0.01em;
}
h2 .num {
  color: var(--text-dim);
  font-weight: 400;
  margin-right: 10px;
}

/* panel = "terminal window" used consistently for content blocks */
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-grid p {
  color: var(--text-muted);
  margin: 0 0 14px;
}
.about-grid p:last-child {
  margin-bottom: 0;
}
.about-grid strong {
  color: var(--text);
  font-weight: 600;
}

.field {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem;
}
.field:last-child {
  border-bottom: none;
}
.field dt {
  color: var(--text-dim);
  font-family: var(--mono);
}
.field dd {
  margin: 0;
  color: var(--text-muted);
  text-align: right;
}

/* =========================================================
   TIMELINE (trayectoria previa — orden cronológico real)
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
}
.tl-item {
  position: relative;
  padding-bottom: 32px;
}
.tl-item:last-child {
  padding-bottom: 0;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
}
.tl-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.tl-role {
  font-weight: 600;
  margin-bottom: 2px;
}
.tl-org {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.tl-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 60ch;
}

/* =========================================================
   TRANSFERABLE SKILLS
   ========================================================= */
.map-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .map-grid {
    grid-template-columns: 1fr;
  }
}

.map-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.map-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.map-row .arrow {
  color: var(--cyan);
}
.map-origin {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
}
.map-dest {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================================
   PROYECTOS — empty state
   ========================================================= */
.empty {
  text-align: center;
  padding: 52px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.empty-icon {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.empty h3 {
  font-family: var(--mono);
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--text);
}
.empty p {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 auto 20px;
  font-size: 0.92rem;
}
.progress-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================
   CONTACTO
   ========================================================= */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .contact-list {
    grid-template-columns: 1fr;
  }
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.92rem;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.contact-list a:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}
.contact-key {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.78rem;
  min-width: 64px;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  padding: 32px 0 48px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

mark {
  background: none;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0 2px;
}
