/* ---------- Tokens ---------- */
:root {
  --bg: #0a0e14;
  --bg-soft: #0f141c;
  --surface: #131a24;
  --border: #1f2937;
  --text: #cbd5e1;
  --text-strong: #f1f5f9;
  --text-muted: #64748b;
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --radius: 14px;
  --max-width: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

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

/* ---------- Background glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, var(--accent-soft), transparent 60%),
    radial-gradient(500px circle at 85% 30%, rgba(94, 234, 212, 0.06), transparent 60%);
  pointer-events: none;
}

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 20, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 1px;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.nav-links a {
  color: var(--text);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 8px 14px;
  border-radius: 8px;
}
.nav-cta:hover { background: var(--accent-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-strong);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding-top: 40px;
  padding-bottom: 60px;
  position: relative;
}
.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-role {
  font-size: clamp(1.3rem, 3.5vw, 2.1rem);
  color: var(--text-muted);
  font-weight: 600;
}
.hero-text {
  max-width: 540px;
  color: var(--text);
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.hero-social {
  display: flex;
  gap: 18px;
  margin-top: 30px;
}
.hero-social svg {
  width: 22px;
  height: 22px;
  fill: var(--text-muted);
  transition: fill 0.2s ease, transform 0.2s ease;
}
.hero-social a:hover svg {
  fill: var(--accent);
  transform: translateY(-2px);
}

.scroll-cue {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollcue 1.6s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #06231f;
}
.btn-primary:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 24px;
  border-top: 1px solid var(--border);
}
.section-num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--text-strong);
  margin-bottom: 40px;
  font-weight: 700;
}

/* ---------- Hero metrics ---------- */
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  max-width: 540px;
}
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric-value {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Leadership ---------- */
.leadership-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
}
.leadership-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 1.02rem;
}
.leadership-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.fact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fact dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.fact dd { color: var(--text-strong); font-size: 0.95rem; }
.career-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.career-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}
.career-year {
  font-family: var(--mono);
  color: var(--accent);
  white-space: nowrap;
}
.career-role { color: var(--text); text-align: right; }

/* ---------- Impact ---------- */
.impact-intro {
  max-width: 560px;
  margin-bottom: 36px;
  font-size: 1.02rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat-value {
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.stat-label { color: var(--text-strong); font-weight: 600; margin-bottom: 8px; }
.stat-desc { color: var(--text-muted); font-size: 0.88rem; }

.stat-highlight {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.stat-highlight-value {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-highlight-label {
  color: var(--text-strong);
  font-weight: 600;
  margin: 6px 0;
}
.stat-highlight-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 460px;
  margin: 0 auto;
}

/* ---------- Principles / Quote ---------- */
.quote {
  margin-top: 32px;
  padding: 26px 30px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-strong);
  line-height: 1.5;
}

/* ---------- Stories ---------- */
.stories-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.story {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s ease;
}
.story:hover { border-color: var(--accent); }
.story-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.story-number {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
}
.story-head h3 { color: var(--text-strong); font-size: 1.1rem; }
.story-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.story-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.story-body p { font-size: 0.9rem; color: var(--text); }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 46px;
}
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute;
  left: -33.5px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.timeline-head h3 {
  color: var(--text-strong);
  font-size: 1.1rem;
}
.timeline-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}
.timeline-company {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 4px 0 10px;
}
.timeline-content ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-content li {
  position: relative;
  padding-left: 18px;
  font-size: 0.95rem;
}
.timeline-content li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Cards (Estudios) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.card h3 { color: var(--text-strong); font-size: 1.05rem; margin-bottom: 6px; }
.card-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Experience header ---------- */
.experience-company {
  color: var(--text-strong);
  font-weight: 600;
  margin-bottom: 32px;
}
.experience-company span {
  color: var(--text-muted);
  font-weight: 400;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.skills-group h3 {
  color: var(--text-strong);
  font-size: 1rem;
  margin-bottom: 14px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags span {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Technical ---------- */
.tech-intro {
  max-width: 560px;
  margin-bottom: 32px;
  color: var(--text-muted);
}

/* ---------- Next ---------- */
.next { text-align: center; }
.next-text {
  max-width: 560px;
  margin: 0 auto 12px;
  font-size: 1.05rem;
  color: var(--text-strong);
}
.next-secondary {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ---------- Contacto ---------- */
.contact { text-align: center; }
.contact-text {
  max-width: 480px;
  margin: 0 auto 30px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
}
.footer p {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .leadership-grid { grid-template-columns: 1fr; }
  .career-list li { flex-direction: column; gap: 2px; }
  .career-role { text-align: left; }
  .story-body { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 68px;
    right: 0;
    height: calc(100vh - 68px);
    width: min(78vw, 300px);
    background: var(--bg-soft);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 28px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 70px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .scroll-cue span { animation: none; }
}
