/* =====================================================================
   Gustavo Quintero — CV / página personal
   Estética: clara, minimalista, editorial. Hecho a mano.
   ===================================================================== */

/* ------------------------- Tokens ------------------------- */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e6e8ec;
  --line-strong: #d3d7df;

  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-soft-2: rgba(37, 99, 235, 0.06);

  --success: #16a34a;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(37, 99, 235, 0.28);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent-ink); }

ul { margin: 0; padding: 0; list-style: none; }

img { max-width: 100%; display: block; }

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------- Buttons ------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn i { font-size: 1.05em; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(37, 99, 235, 0.7);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(37, 99, 235, 0.65);
}

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--accent-soft-2);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* ------------------------- Header / Nav ------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.8);
}
.brand-name { font-size: 1rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav > a {
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  position: relative;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--ink); }
.nav > a.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.nav-cv { margin-left: 0.4rem; }
.nav-cv:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.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); }

/* ------------------------- Sections ------------------------- */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.section-alt { background: var(--surface); }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
  margin-top: 0.5rem;
}
.section-sub {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 65ch;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.kicker-center { display: inline-block; }

/* ------------------------- Hero ------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 12vw, 8.5rem);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 78% 8%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(45% 50% at 8% 18%, rgba(37, 99, 235, 0.07), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg) 70%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(75% 70% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 330px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-text { min-width: 0; }

.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 50px -22px rgba(15, 23, 42, 0.35), 0 0 0 6px var(--accent-soft);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 5rem);
  letter-spacing: -0.035em;
  margin-bottom: 0.35rem;
}
.hero-role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 3.5vw, 1.9rem);
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.accent { color: var(--accent); }

.hero-lead {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-2);
  max-width: 60ch;
  margin-bottom: 1.75rem;
}
.hero-lead strong { color: var(--ink); font-weight: 600; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.hero-chips i { color: var(--accent); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero-social {
  display: flex;
  gap: 0.4rem;
}
.hero-social a,
.cta-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.hero-social a:hover,
.cta-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ------------------------- Perfil ------------------------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.profile-text p { font-size: 1.1rem; }
.profile-text strong { color: var(--ink); font-weight: 600; }

.profile-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.section-alt .profile-facts { background: var(--bg); }
.profile-facts dl { margin: 0; display: grid; gap: 1.15rem; }
.profile-facts dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.profile-facts dt i { color: var(--accent); font-size: 0.95rem; }
.profile-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

/* ------------------------- Stack chips ------------------------- */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.stack li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.32rem 0.6rem;
  border-radius: 7px;
  white-space: nowrap;
}
.section-alt .stack li { background: var(--bg); }

/* ------------------------- Cards (Proyectos) ------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.4rem;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #22d3ee));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-lg);
}
.card:hover::before { transform: scaleX(1); }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.card-index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--line-strong);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.badge-live { color: var(--success); background: rgba(22, 163, 74, 0.10); }
.badge-live .status-dot { background: var(--success); }
.badge-dev { color: #b45309; background: rgba(217, 119, 6, 0.12); }
.badge-dev .status-dot { background: #d97706; animation: none; }

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.card-tag {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-ink);
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
}
.card-desc {
  font-size: 0.97rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
}
.card-points {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}
.card-points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.card-points li::before {
  content: "\2713"; /* ✓ check (independiente del icon-font) */
  position: absolute;
  left: 0;
  top: 0.02em;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}
.card .stack { margin-bottom: 1.2rem; }

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.4rem;
}
.card-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: all 0.2s var(--ease);
}
.card-links a i { font-size: 0.85rem; color: var(--accent); transition: transform 0.2s var(--ease); }
.card-links a:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.card-links a:hover i { transform: translate(2px, -2px); }

/* ------------------------- Subhead (dentro de sección) ------------------------- */
.subhead {
  margin: clamp(2.75rem, 6vw, 3.75rem) 0 1.5rem;
}
.subhead h3 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}
.subhead p {
  margin-top: 0.4rem;
  color: var(--muted);
}

/* ------------------------- Mini cards (Otros proyectos) ------------------------- */
.cards-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.mini-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.mini-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-md);
}
.mini-card h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.mini-card h4 i {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.9rem;
  transition: transform 0.2s var(--ease);
}
.mini-card:hover h4 i { transform: translate(2px, -2px); }
.mini-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ------------------------- Demo chips (experimentos) ------------------------- */
.demo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.demo-chip i {
  font-size: 0.76rem;
  color: var(--accent);
  transition: transform 0.2s var(--ease);
}
.demo-chip:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-soft-2);
  transform: translateY(-2px);
}
.demo-chip:hover i { transform: translate(2px, -2px); }

/* ------------------------- Timeline ------------------------- */
.timeline {
  position: relative;
  max-width: 820px;
  margin-left: 0.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line) 85%);
}
.tl-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 2.5rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-marker {
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}
.tl-head h3 { font-size: 1.25rem; }
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.tl-org {
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0.3rem 0 0.85rem;
}
.tl-body ul { display: grid; gap: 0.55rem; }
.tl-body ul li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.98rem;
}
.tl-body ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tl-body strong { color: var(--ink); font-weight: 600; }

/* ------------------------- Stats band ------------------------- */
.stats-band {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}
.stat {
  text-align: center;
  padding-inline: 0.5rem;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-num .plus { color: var(--accent); }
.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ------------------------- Skills (bars) ------------------------- */
.skills-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}
.skill-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  margin-bottom: 1.35rem;
}
.skill-card h3 i { color: var(--accent); font-size: 1.15rem; }

.skill-row { margin-bottom: 0.95rem; }
.skill-row:last-child { margin-bottom: 0; }
.skill-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.bar {
  height: 7px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #22d3ee));
  transition: width 1.1s var(--ease) 0.15s;
}
.reveal.in .bar > i { width: var(--lvl); }

.skills-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.skill-group-chips {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-sm);
}
.skill-group-chips h4 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.skill-group-chips h4 i { color: var(--accent); }

/* ------------------------- Fortalezas / Cómo trabajo ------------------------- */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.strength-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.strength-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.strength-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.strength-card h3 { font-size: 1.12rem; margin-bottom: 0.85rem; }
.strength-card ul { display: grid; gap: 0.5rem; }
.strength-card ul li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.strength-card ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ------------------------- Cert blocks ------------------------- */
.cert-block { margin-bottom: 1.4rem; }
.cert-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.edu-thesis {
  font-size: 0.95rem;
  color: var(--ink-2);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 0.9rem;
  border-radius: 0 8px 8px 0;
  margin-top: 0.6rem;
}
.section-alt .edu-thesis { background: var(--bg); }
.edu-thesis i { color: var(--accent); }
.edu-item + .edu-item { margin-top: 1.5rem; }

/* ------------------------- Formación ------------------------- */
.formacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.formacion-sub {
  font-size: 1.05rem;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 1.1rem;
}
.edu-item h4 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.edu-item .tl-date { display: inline-block; margin-bottom: 0.2rem; }
.edu-item .tl-org { margin-top: 0.1rem; }

.cert-list { display: grid; gap: 0.7rem; }
.cert-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--ink);
}
.cert-list li i { color: var(--accent); transform: translateY(2px); }
.cert-list li span { color: var(--muted); font-weight: 400; }
.cert-note { margin-top: 1.1rem; color: var(--muted); font-size: 0.92rem; }

/* ------------------------- CTA / Contacto ------------------------- */
.section-cta {
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  border-top: 1px solid var(--line);
}
.section-cta .container { max-width: 720px; }
.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 1rem 0 0.85rem;
}
.cta-lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.cta-social {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

/* ------------------------- Footer ------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.75rem;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.footer-muted { color: var(--muted); }

/* ------------------------- Reveal animation ------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* Stagger cards/skills within a grid */
.cards .card,
.skills-grid .skill-group { transition-delay: var(--d, 0s); }

/* ------------------------- Responsive ------------------------- */
@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
  .formacion-grid { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-photo { max-width: 210px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem clamp(1.15rem, 4vw, 2.5rem) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav > a {
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    border-radius: 10px;
  }
  .nav-cv {
    margin-left: 0;
    margin-top: 0.4rem;
    justify-content: center;
  }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 0.5rem; }
  .stat { border-right: none; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
}

@media (max-width: 420px) {
  .brand-name { display: none; }
  .hero-actions .btn,
  .cta-actions .btn { width: 100%; justify-content: center; }
}

/* ------------------------- Reduced motion ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot { animation: none; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
