:root {
  --ink: #15202b;
  --ink-soft: #3d4a57;
  --muted: #6b7885;
  --paper: #eef2f5;
  --paper-2: #e4eaef;
  --line: rgba(21, 32, 43, 0.12);
  --accent: #2f8fad;
  --accent-deep: #1f6f8a;
  --accent-soft: rgba(47, 143, 173, 0.14);
  --coral: #e07a5f;
  --coral-deep: #c9634a;
  --warm: #d4a373;
  --mint: #3d9b8f;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --space: clamp(1.25rem, 4vw, 3rem);
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 640px at 8% -8%, rgba(47, 143, 173, 0.22), transparent 55%),
    radial-gradient(800px 520px at 95% 12%, rgba(224, 122, 95, 0.14), transparent 48%),
    radial-gradient(700px 480px at 50% 100%, rgba(61, 155, 143, 0.1), transparent 50%),
    linear-gradient(180deg, #f6f8fa 0%, var(--paper) 42%, var(--paper-2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— Top nav —— */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--space);
  backdrop-filter: blur(14px);
  background: rgba(246, 248, 250, 0.82);
  border-bottom: 1px solid var(--line);
}

.top__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.top__nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.top__nav a:hover {
  color: var(--accent-deep);
}

.top__cta {
  color: #fff !important;
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  border-bottom: none !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 6px;
}

.top__cta:hover {
  color: #fff !important;
  filter: brightness(1.05);
}

.top__menu {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
}

.top__menu span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.25s;
}

.top__menu[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.top__menu[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* —— Hero —— */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  min-height: min(78vh, 640px);
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--space) clamp(2rem, 5vw, 3rem);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero__lead {
  margin: 1.35rem 0 0;
  max-width: 30rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
  text-align: justify;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease), filter 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #f7fafc;
}

.btn--primary:hover {
  filter: brightness(1.06);
}

.btn--secondary {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  color: #fff;
}

.btn--secondary:hover {
  filter: brightness(1.05);
}

.btn--accent {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: rgba(47, 143, 173, 0.35);
}

.btn--accent:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border-color: transparent;
}

.btn--ghost {
  border-color: rgba(47, 143, 173, 0.35);
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fade 1.1s var(--ease) 0.35s forwards;
}

.hero__frame {
  margin: 0;
  width: min(100%, 280px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  outline: 1px solid rgba(47, 143, 173, 0.25);
  background: linear-gradient(160deg, #d8e8ef, #f0e4dc);
}

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.04);
  animation: ken 12s var(--ease) 0.5s forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes ken {
  to {
    transform: scale(1);
  }
}

/* —— Sections —— */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) var(--space);
}

.section--tone {
  max-width: none;
  padding-left: max(var(--space), calc((100% - var(--max)) / 2 + var(--space)));
  padding-right: max(var(--space), calc((100% - var(--max)) / 2 + var(--space)));
  background: rgba(255, 255, 255, 0.48);
  border-block: 1px solid var(--line);
}

.section__head {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 36rem;
}

.section__head h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section__head p {
  margin: 0;
  color: var(--muted);
  text-align: justify;
  text-wrap: pretty;
}

.about {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.about__main {
  display: grid;
  gap: 1rem;
}

.about__text {
  margin: 0;
  font-size: 1.12rem;
  color: var(--ink-soft);
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
}

.about__text--soft {
  font-size: 1.02rem;
  color: var(--muted);
}

.about__facts {
  margin: 0;
  display: grid;
  gap: 0;
  padding: 0.25rem 0 0;
  border-top: 2px solid var(--accent);
}

.about__facts div {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.about__facts div:first-child {
  border-top: 0;
}

.about__facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 0.25rem;
}

.about__facts dd {
  margin: 0;
  font-weight: 500;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--max);
  margin-inline: auto;
  border-left: 2px solid rgba(47, 143, 173, 0.35);
}

.timeline__item {
  position: relative;
  padding: 0 0 2.5rem 1.75rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.22);
}

.timeline__when {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.4rem;
}

.timeline__role {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.timeline__org {
  margin: 0 0 0.65rem;
  font-weight: 500;
  color: var(--coral-deep);
}

.timeline__desc {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
  text-align: justify;
  text-wrap: pretty;
}

/* Domains */
.domains {
  list-style: none;
  margin: 0;
  padding: 0;
}

.domains__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.domains__item:first-child {
  border-top: 1px solid var(--line);
}

.domains__name {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.domains__desc {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
  font-size: 0.98rem;
  text-align: justify;
  text-wrap: pretty;
}

.domains__btn {
  white-space: nowrap;
  align-self: center;
}

/* Skills */
.skills-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 2.5rem);
  max-width: var(--max);
  margin: 0 auto;
}

.skills-group h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.skills-group:nth-child(2) h3 {
  color: var(--coral-deep);
}

.skills-group:nth-child(3) h3 {
  color: var(--mint);
}

.skills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.skills li {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-bottom: 0.35rem;
  border-bottom: 1.5px solid rgba(47, 143, 173, 0.28);
}

.skills-group:nth-child(2) .skills li {
  border-bottom-color: rgba(224, 122, 95, 0.3);
}

.skills-group:nth-child(3) .skills li {
  border-bottom-color: rgba(61, 155, 143, 0.35);
}

/* Experience side (emprendimiento) */
.exp-side {
  max-width: var(--max);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.exp-side__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.exp-side__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.exp-side__list li {
  display: grid;
  gap: 0.2rem;
}

.exp-side__list strong {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.exp-side__list span {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: justify;
  text-wrap: pretty;
}

/* Contact */
.contact__grid {
  display: grid;
  gap: 1.75rem;
  max-width: 40rem;
}

.contact__row {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.contact__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact__actions--stack {
  flex-direction: column;
  align-items: flex-start;
}

.contact__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1.5px solid rgba(47, 143, 173, 0.28);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}

.contact__chip strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.contact__chip:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.contact__chip--wa {
  background: rgba(37, 211, 102, 0.12);
  color: #1aaa4f;
  border-color: rgba(37, 211, 102, 0.35);
}

.contact__chip--wa:hover {
  background: #25d366;
  color: #fff;
  border-color: transparent;
}

.contact__icon {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.foot {
  padding: 2rem var(--space) 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.foot p {
  margin: 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: left;
    justify-items: stretch;
    gap: 1.5rem;
    padding-top: 1.25rem;
  }

  .hero__copy {
    align-items: stretch;
  }

  .hero__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    line-height: 1.45;
  }

  .hero__name {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .hero__lead {
    max-width: none;
  }

  .hero__actions {
    justify-content: stretch;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
    min-width: 9rem;
  }

  .hero__visual {
    order: -1;
    justify-content: center;
  }

  .hero__frame {
    width: min(48vw, 200px);
  }

  .about {
    grid-template-columns: 1fr;
  }

  .skills-groups {
    grid-template-columns: 1fr;
  }

  .domains__item {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .domains__btn {
    justify-self: stretch;
    width: 100%;
  }

  .timeline__item {
    padding-left: 1.35rem;
  }

  .contact__chip {
    width: 100%;
  }

  .contact__actions {
    width: 100%;
  }

  .contact__actions:not(.contact__actions--stack) {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1rem;
  }

  .top {
    padding: 0.75rem 1rem;
  }

  .section {
    padding: 2.75rem 1.15rem;
  }

  .section--tone {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .hero {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .top__menu {
    display: block;
  }

  .top__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.15rem 1.25rem;
    background: rgba(246, 248, 250, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .top__nav.is-open {
    display: flex;
  }

  .top__nav a {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .top__cta {
    width: auto !important;
    margin-top: 0.5rem;
    border-radius: 6px;
  }

  .contact__chip strong {
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__copy,
  .hero__visual,
  .hero__frame img,
  .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
