/* ---------- Reset & variables ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0e17;
  --bg-alt: #10151f;
  --card: #141a26;
  --border: #232b3d;
  --text: #e8ecf4;
  --text-dim: #9aa5b8;
  --accent: #4f9dff;
  --accent-2: #8b5cf6;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

section { padding: 88px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h1, h2, h3 { font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 16px; }
.section-intro { color: var(--text-dim); max-width: 640px; margin-bottom: 48px; }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient); color: #04070d; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Header / nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 70px;
  text-align: left;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.hero::before {
  width: 420px; height: 420px;
  background: var(--accent);
  top: -160px; right: -120px;
}
.hero::after {
  width: 320px; height: 320px;
  background: var(--accent-2);
  bottom: -140px; right: 220px;
  opacity: 0.25;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-visual { justify-self: center; }

.hero-photo-wrap {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--gradient);
  padding: 6px;
  box-shadow: 0 0 60px rgba(79, 157, 255, 0.35);
}
.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 4px solid var(--bg);
}
.orbit-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient);
}
.orbit-dot-1 { width: 20px; height: 20px; top: 6%; right: -3%; }
.orbit-dot-2 { width: 13px; height: 13px; bottom: 8%; left: -5%; opacity: 0.75; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 8px; }
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 780px;
}
.hero p.lead {
  margin-top: 20px;
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--text-dim);
}
.hero p.lead strong {
  color: var(--text);
  font-weight: 700;
}
.hero .actions { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }

.avatar-badge {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.6rem;
  color: #04070d;
  margin-bottom: 28px;
  overflow: hidden;
}
.avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

.pillar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pillar-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.pillar-card .icon {
  width: 56px; height: 56px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(79, 157, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
}
.pillar-card .icon svg { width: 30px; height: 30px; }
.pillar-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.pillar-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Cards / grids (proyectos, recursos) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.card-media {
  width: calc(100% + 52px);
  margin: -26px -26px 4px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(79, 157, 255, 0.12);
  color: var(--accent);
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--text-dim); font-size: 0.94rem; }
.card .card-link { margin-top: auto; font-weight: 600; color: var(--accent); font-size: 0.9rem; }
.card .card-link:hover { text-decoration: underline; }

.card-soon {
  border-style: dashed;
  background: transparent;
}
.card-soon .tag { background: rgba(139, 92, 246, 0.12); color: var(--accent-2); }

a.card {
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* ---------- Timeline (sobre-mi) ---------- */
.timeline { display: flex; flex-direction: column; gap: 28px; }
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item .period { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.timeline-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.timeline-item p { color: var(--text-dim); font-size: 0.94rem; }
@media (max-width: 620px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* Logo + heading row, LinkedIn-style */
.entry-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.entry-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.entry-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.entry-logo.badge {
  background: var(--gradient);
  color: #04070d;
  font-weight: 800;
  font-size: 0.95rem;
}
.entry-head h3 { margin-bottom: 0; }

/* Grouped roles under one company (Capgemini-style) */
.entry-group { display: flex; flex-direction: column; gap: 22px; }
.entry-group .sub-role {
  padding-left: 52px;
  border-left: 2px solid var(--border);
  margin-left: 19px;
  padding-bottom: 4px;
}
.entry-group .sub-role .period { font-size: 0.82rem; }
.entry-group .sub-role h4 { font-size: 0.98rem; margin-bottom: 4px; }
.entry-group .sub-role p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Logo strip ---------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.logo-strip img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(1) opacity(0.75);
  transition: opacity 0.15s ease;
}
.logo-strip img:hover { opacity: 1; }

/* ---------- Highlight stats ---------- */
.highlight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.highlight-stat { display: flex; flex-direction: column; gap: 4px; }
.highlight-stat strong {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.highlight-stat span { color: var(--text-dim); font-size: 0.88rem; }

/* ---------- Values ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 620px) { .values-grid { grid-template-columns: 1fr; } }
.value-item {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
}
.value-item h3 { font-size: 1rem; margin-bottom: 6px; }
.value-item p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.testimonial p.quote { font-size: 0.94rem; color: var(--text-dim); font-style: italic; margin-bottom: 16px; }
.testimonial .author { font-weight: 700; font-size: 0.9rem; }
.testimonial .role { color: var(--text-dim); font-size: 0.8rem; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------- Section alt background ---------- */
.section-alt { background: var(--bg-alt); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-cta h2 { margin-bottom: 12px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.social-row { display: flex; gap: 16px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
  color: var(--text-dim);
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); }
.copyright { color: var(--text-dim); font-size: 0.82rem; }

/* ---------- Fade-in on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
