:root {
  --basil: #173c2a;
  --leaf: #4d7c39;
  --olive: #7f9550;
  --mint: #dcebd6;
  --cream: #fff8ed;
  --paper: #fffcf6;
  --citrus: #f4ba45;
  --clay: #b86f47;
  --ink: #162119;
  --muted: #66725f;
  --line: rgba(23, 60, 42, 0.14);
  --shadow: 0 28px 80px rgba(23, 60, 42, 0.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(244, 186, 69, 0.22), transparent 26rem),
    radial-gradient(circle at 94% 4%, rgba(77, 124, 57, 0.18), transparent 22rem),
    linear-gradient(135deg, #fffaf0 0%, #f5f0e5 48%, #e8f0dd 100%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 60, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 60, 42, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 75%);
  z-index: -1;
}

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

a {
  color: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 14px 0 32px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 60px rgba(23, 60, 42, 0.11);
}

.topbar.is-compact {
  padding: 9px 12px;
  box-shadow: 0 12px 42px rgba(23, 60, 42, 0.13);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 2px solid rgba(255, 252, 246, 0.9);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, #f6d47a, transparent 36%),
    linear-gradient(135deg, var(--basil), #285f3e);
  box-shadow: inset 0 0 0 1px rgba(23, 60, 42, 0.2);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a,
.footer a,
.footer button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--basil);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 13px;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.footer a:hover,
.footer button:hover {
  background: rgba(23, 60, 42, 0.1);
  transform: translateY(-1px);
}

.nav-links .nav-cta {
  background: var(--basil);
  color: #fffdf5;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--basil);
  color: #fff;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, 0.76fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.hero {
  min-height: calc(100vh - 118px);
  padding: 44px 0 72px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--leaf);
  font-size: clamp(0.76rem, 1.1vw, 0.86rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--basil);
  line-height: 0.98;
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: -0.06em;
}

h1 {
  max-width: 900px;
  font-size: clamp(3.4rem, 8.8vw, 7.7rem);
}

h2 {
  font-size: clamp(2.15rem, 5.4vw, 5rem);
}

h3 {
  font-size: 1.16rem;
  line-height: 1.25;
}

.hero-role {
  display: inline-flex;
  margin: 22px 0 0;
  padding: 9px 14px;
  border: 1px solid rgba(23, 60, 42, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--basil);
  font-weight: 900;
}

.hero-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #405040;
  font-size: clamp(1.02rem, 1.55vw, 1.24rem);
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 900;
  padding: 12px 18px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.contact-links a:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--basil);
  color: #fffdf5;
  box-shadow: 0 16px 38px rgba(23, 60, 42, 0.24);
}

.button.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--basil);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.hero-metrics article {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 252, 246, 0.72);
}

.hero-metrics span {
  display: block;
  color: var(--clay);
  font-family: var(--font-display);
  font-size: 1.58rem;
  font-weight: 800;
}

.hero-metrics strong {
  display: block;
  margin-top: 8px;
  color: #3c493d;
  font-size: 0.9rem;
  line-height: 1.35;
}

.hero-visual {
  position: relative;
  min-height: 660px;
}

.portrait-card {
  position: relative;
  overflow: hidden;
  border: 12px solid rgba(255, 252, 246, 0.86);
  border-radius: 46px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(23, 60, 42, 0.52), transparent);
  pointer-events: none;
}

.portrait-card img {
  aspect-ratio: 4 / 5;
  height: min(72vh, 720px);
  width: 100%;
  object-fit: cover;
}

.portrait-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portrait-badge span {
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--basil);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 10px;
}

.floating-note {
  position: absolute;
  max-width: 210px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.86);
  box-shadow: 0 18px 55px rgba(23, 60, 42, 0.14);
  backdrop-filter: blur(18px);
}

.floating-note strong,
.floating-note span {
  display: block;
}

.floating-note strong {
  color: var(--basil);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1;
}

.floating-note span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.note-one {
  left: -42px;
  top: 248px;
}

.note-two {
  right: -26px;
  bottom: 94px;
}

.profile-band,
.research-card,
.contact-card {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  margin: 40px 0;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.9), rgba(232, 240, 221, 0.7)),
    var(--paper);
  box-shadow: var(--shadow);
}

.profile-band p:last-child,
.section-heading p,
.contact-card p {
  color: #4b5b4a;
  font-size: 1.03rem;
}

.focus-section,
.experience-section,
.education-section,
.research-section,
.contact-section {
  padding: clamp(58px, 8vw, 112px) 0;
}

.section-heading {
  max-width: 840px;
}

.section-heading p {
  max-width: 620px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.focus-card,
.timeline-item,
.education-column {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 252, 246, 0.72);
  box-shadow: 0 18px 60px rgba(23, 60, 42, 0.08);
}

.focus-card {
  min-height: 332px;
  padding: 24px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.focus-card:hover {
  border-color: rgba(23, 60, 42, 0.32);
  background: rgba(255, 252, 246, 0.95);
  transform: translateY(-6px);
}

.card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 18px;
  background: var(--mint);
  color: var(--basil);
  font-family: var(--font-display);
  font-weight: 800;
}

.focus-card p,
.timeline-item p,
.research-list p,
.education-column p,
.clean-list {
  color: #556251;
  font-size: 0.94rem;
}

.sticky-heading {
  position: sticky;
  top: 122px;
  align-self: start;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding: 26px 28px 26px 34px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 16px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--citrus), var(--leaf));
}

.timeline-date {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-card {
  position: relative;
  overflow: hidden;
  grid-template-columns: 0.7fr 1.3fr;
  background:
    radial-gradient(circle at 8% 20%, rgba(244, 186, 69, 0.25), transparent 18rem),
    linear-gradient(135deg, #173c2a, #245939 54%, #6d8f45);
  color: #fffdf5;
}

.research-card .eyebrow,
.research-card h2,
.research-card h3 {
  color: #fffdf5;
}

.research-list {
  display: grid;
  gap: 16px;
}

.research-list article {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.1);
}

.research-list span {
  display: block;
  margin-bottom: 7px;
  color: #f8db8a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-list p {
  color: rgba(255, 253, 245, 0.78);
}

.molecule {
  position: absolute;
  inset: 0 auto auto 0;
  width: 310px;
  height: 310px;
  opacity: 0.28;
}

.molecule span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #fffdf5;
}

.molecule span:nth-child(1) {
  width: 88px;
  height: 88px;
  left: 40px;
  top: 44px;
}

.molecule span:nth-child(2) {
  width: 56px;
  height: 56px;
  left: 188px;
  top: 110px;
}

.molecule span:nth-child(3) {
  width: 120px;
  height: 120px;
  left: 84px;
  top: 180px;
}

.education-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}

.education-column {
  padding: 30px;
}

.education-column article + article {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.education-column span {
  display: block;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.education-column strong {
  display: block;
  margin-top: 6px;
  color: var(--basil);
}

.clean-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  position: relative;
  padding-left: 22px;
}

.clean-list li::before {
  content: "";
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--leaf);
}

.skills-marquee {
  overflow: hidden;
  margin: 20px calc(50% - 50vw);
  padding: 18px 0;
  background: var(--basil);
  color: #fffdf5;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  margin-right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.marquee-track::after {
  content: "Tecnología de alimentos  Calidad e inocuidad  GC-MS  Análisis fisicoquímicos  Investigación aplicada  Data Science  R y Python  Desarrollo de productos";
  display: inline-flex;
  align-items: center;
  white-space: pre;
  font-weight: 900;
  opacity: 0.75;
}

.contact-card {
  grid-template-columns: 220px minmax(0, 1fr);
}

.contact-card img {
  width: 220px;
  height: 220px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 42%;
  border: 10px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  box-shadow: 0 20px 50px rgba(23, 60, 42, 0.16);
}

.contact-links {
  margin-top: 22px;
}

.contact-links a {
  border: 1px solid var(--line);
  background: #fffdf5;
  color: var(--basil);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 0 48px;
  color: var(--muted);
}

.footer div {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--basil);
  color: #fffdf5;
  font-weight: 900;
  box-shadow: 0 16px 40px rgba(23, 60, 42, 0.24);
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .site-shell {
    width: min(100% - 24px, 760px);
  }

  .topbar {
    align-items: flex-start;
    border-radius: 28px;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 26px;
    background: rgba(255, 252, 246, 0.94);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    border-radius: 18px;
    padding: 13px 16px;
  }

  .section-grid,
  .profile-band,
  .research-card,
  .education-layout,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero-visual {
    min-height: auto;
  }

  .portrait-card {
    transform: none;
  }

  .floating-note {
    position: static;
    max-width: none;
    margin-top: 12px;
  }

  .hero-metrics,
  .focus-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-heading {
    position: static;
  }

  .contact-card img {
    width: 180px;
    height: 180px;
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 18px, 520px);
  }

  .topbar {
    top: 8px;
    margin-top: 8px;
  }

  .brand-copy small {
    display: none;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .hero-role {
    align-items: flex-start;
    border-radius: 22px;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

  .button,
  .contact-links a {
    width: 100%;
  }

  .hero-metrics,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .profile-band,
  .research-card,
  .education-column,
  .contact-card {
    border-radius: 30px;
    padding: 24px;
  }

  .focus-card {
    min-height: auto;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
