:root {
  --bg: #060606;
  --bg-soft: #0b0b0b;
  --surface: #111111;
  --surface-2: #171717;
  --surface-3: #1d1d1d;
  --text: #f3f3f1;
  --muted: #a2a2a0;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255,255,255,.16);
  --green: #2ecc71;
  --green-mid: #1f8f53;
  --green-soft: rgba(46, 204, 113, 0.08);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 10%, rgba(46,204,113,.06), transparent 18%),
    radial-gradient(circle at 16% 24%, rgba(46,204,113,.03), transparent 12%),
    linear-gradient(180deg, #090909 0%, #060606 48%, #050505 100%);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
}

body.menu-open { overflow: hidden; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-160%);
  background: var(--green);
  color: #041008;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 48px), var(--container)); margin: 0 auto; }
section[id] { scroll-margin-top: 0; }
.section { padding: clamp(76px, 7vw, 108px) 0; }
.section-muted {
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,.008));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.site-header { position: fixed; inset: 0 0 auto; z-index: 100; border-bottom: 1px solid transparent; transition: .25s ease; }
.site-header.scrolled { background: rgba(6,6,6,.82); backdrop-filter: blur(18px); border-bottom-color: var(--line); }
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { text-decoration: none; display: inline-flex; align-items: center; }
.brand-full,
.brand-short,
.footer-signature {
  font-family: "Allura", cursive;
  color: #f7f7f4;
  letter-spacing: .01em;
}
.brand-full { font-size: 2.3rem; line-height: 1; }
.brand-short { display: none; font-size: 2.15rem; line-height: 1; }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 26px); }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .94rem; transition: color .2s ease, transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav .nav-resume-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(46,204,113,.48);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(46,204,113,.94), rgba(31,143,83,.94));
  color: #041008;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(46,204,113,.12);
}
.main-nav .nav-resume-link:hover {
  color: #041008;
  transform: translateY(-1px);
  border-color: rgba(90,230,145,.72);
  box-shadow: 0 11px 26px rgba(46,204,113,.18);
}
.menu-toggle { display: none; }

#inicio { scroll-margin-top: 0; }
.hero { padding-top: clamp(112px, 10vw, 144px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-copy, .section-heading, .section-copy { min-width: 0; }
.eyebrow { color: #d8e5dc; font-size: .78rem; font-weight: 800; letter-spacing: .17em; }
h1, h2, h3, h4 { margin-top: 0; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -.035em; }
h1 { max-width: 820px; margin: 18px 0 24px; font-size: clamp(2.55rem, 4.4vw, 4.8rem); line-height: 1.03; text-wrap: balance; }
.hero-subtitle { max-width: 720px; color: var(--muted); font-size: 1.12rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag-list span {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: #f0f2ef;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: .84rem;
  font-weight: 600;
}
.tag-list.compact { margin-top: 18px; }
.tag-list.compact span { padding: 6px 10px; font-size: .75rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 13px; text-decoration: none; font-weight: 750; transition: .2s ease; }
.button-primary { background: linear-gradient(180deg, rgba(46,204,113,.92), rgba(31,143,83,.92)); color: #041008; box-shadow: 0 10px 30px rgba(46,204,113,.14); }
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(46,204,113,.2); }
.button-secondary { border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.button-secondary:hover { border-color: rgba(46,204,113,.45); color: #def5e6; }


.hero-visual { min-height: clamp(350px, 38vw, 500px); position: relative; display: grid; place-items: center; }
.portrait-scene {
  position: relative;
  width: min(100%, 410px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 34px;
  background: #090909;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.08);
}
.portrait-backdrop { display: none; }
.portrait-photo-final {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.metrics-grid { margin-top: clamp(56px, 6vw, 76px); display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: rgba(255,255,255,.018); }
.metric-card { padding: 30px; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.metric-card::after { content: ""; position: absolute; left: 30px; right: 30px; bottom: 20px; height: 2px; border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(46,204,113,.28)); }
.metric-card + .metric-card { border-left: 1px solid var(--line); }
.metric-card strong { font-family: "Space Grotesk"; font-size: 2rem; color: #f6f6f2; }
.metric-card span { color: var(--muted); font-size: .9rem; max-width: 230px; }

.section-grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: clamp(48px, 6vw, 86px); }
.section-heading h2 { margin: 14px 0 0; font-size: clamp(2rem, 3vw, 3.25rem); line-height: 1.08; text-wrap: balance; }
.section-heading.heading-wide { max-width: 820px; margin-bottom: 48px; }
.section-heading.heading-wide h2 br { display: block; }
.section-heading.heading-wide p { max-width: 680px; color: var(--muted); }
.section-copy { color: var(--muted); font-size: 1.05rem; }
.section-copy p:first-child { margin-top: 0; }

.cases-list { display: grid; gap: 18px; }
.case-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.012)); overflow: hidden; transition: .25s ease; }
.case-card:hover { border-color: rgba(46,204,113,.16); }
.case-card.open { border-color: rgba(46,204,113,.26); box-shadow: 0 24px 70px rgba(0,0,0,.22); }
.case-summary { width: 100%; display: grid; grid-template-columns: 1fr 210px 32px; gap: 28px; align-items: center; padding: 30px; color: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; }
.case-meta { color: #d4e1d8; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.case-summary h3 { margin: 10px 0 10px; font-size: clamp(1.4rem, 2vw, 2.05rem); }
.case-summary p { color: var(--muted); margin: 0; max-width: 720px; }
.case-result { border-left: 1px solid var(--line); padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.case-result strong { color: #f2f5f1; font-family: "Space Grotesk"; font-size: 1.1rem; }
.case-result span { color: var(--muted); font-size: .82rem; }
.case-icon { font-size: 1.8rem; color: rgba(46,204,113,.9); transition: .2s ease; }
.case-card.open .case-icon { transform: rotate(45deg); }
.case-details { border-top: 1px solid var(--line); }
.case-content { max-width: 900px; padding: 44px 30px 36px; margin: 0 auto; }
.case-content section + section { margin-top: 44px; }
.case-content h4 { margin-bottom: 12px; font-family: "Space Grotesk"; font-size: 1.3rem; }
.case-content p { color: var(--muted); }
.case-content blockquote { margin: 24px 0 0; padding: 20px 24px; border-left: 3px solid rgba(46,204,113,.8); background: rgba(255,255,255,.022); border-radius: 0 14px 14px 0; color: #edf4ef; font-weight: 600; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.result-grid div { padding: 22px; border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.result-grid strong { display: block; color: #f7f7f4; font-size: 1.5rem; font-family: "Space Grotesk"; }
.result-grid span { color: var(--muted); font-size: .82rem; }
.confidentiality { margin-top: 46px !important; padding-top: 20px; border-top: 1px solid var(--line); font-size: .76rem; }

.validation-diagram { margin: 24px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.02); display: grid; gap: 16px; justify-items: center; }
.validation-hub, .validation-checks span, .validation-bottom span { border: 1px solid rgba(46,204,113,.22); background: rgba(46,204,113,.06); color: #edf7f0; border-radius: 12px; padding: 11px 14px; font-size: .84rem; text-align: center; }
.validation-hub { min-width: 170px; font-weight: 700; }
.validation-checks, .validation-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.validation-arrow { color: rgba(46,204,113,.8); font-size: 1.2rem; }

.hub-diagram {
  --diagram-size: min(100%, 460px);
  --outer-ring: 74%;
  --inner-ring: 58%;
  --center-size: clamp(126px, 30vw, 146px);
  --node-size: clamp(72px, 17vw, 84px);
  position: relative;
  width: var(--diagram-size);
  aspect-ratio: 1;
  margin: 28px auto;
}
.hub-center, .hub-item {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.03);
  color: #eef3ef;
}
.hub-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--center-size);
  height: var(--center-size);
  border-color: rgba(46,204,113,.32);
  background: rgba(46,204,113,.08);
  font-weight: 700;
  z-index: 2;
}
.hub-item {
  width: var(--node-size);
  height: var(--node-size);
  font-size: .86rem;
  z-index: 2;
}
.hub-diagram::before,
.hub-diagram::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.hub-diagram::before {
  width: var(--outer-ring);
  height: var(--outer-ring);
  border: 1px dashed rgba(46,204,113,.18);
}
.hub-diagram::after {
  width: var(--inner-ring);
  height: var(--inner-ring);
  border: 1px solid rgba(255,255,255,.08);
}
.hub-top,
.hub-right,
.hub-bottom-right,
.hub-bottom-left,
.hub-left {
  transform: translate(-50%, -50%);
}
.hub-top { top: 14%; left: 50%; }
.hub-right { top: 39%; left: 83%; }
.hub-bottom-right { top: 79%; left: 70%; }
.hub-bottom-left { top: 79%; left: 30%; }
.hub-left { top: 39%; left: 17%; }

.sheet-concept {
  width: min(100%, 680px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 24px 0;
  background: rgba(255,255,255,.02);
}
.sheet-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr .95fr;
  gap: 8px;
  margin-top: 8px;
}
.sheet-row span {
  min-width: 0;
  min-height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #e8ece9;
  font-size: .82rem;
  line-height: 1.25;
}
.sheet-head span { background: rgba(46,204,113,.1); color: #eff8f1; font-weight: 700; }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(rgba(46,204,113,.5), rgba(46,204,113,.06)); }
.timeline-item { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 26px; padding: 0 0 46px 34px; }
.timeline-item::before { content: ""; position: absolute; left: 3px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: rgba(46,204,113,.9); box-shadow: 0 0 0 7px rgba(46,204,113,.08); }
.timeline-year { color: #d7e2da; font-size: .78rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.timeline h3 { margin: 0; font-size: 1.5rem; }
.timeline h4 { margin: 4px 0 10px; color: #dfe7e2; }
.timeline p { margin: 0; color: var(--muted); }
.org-row { display: flex; align-items: center; gap: 14px; }
.org-logo-wrap,
.edu-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}
.org-logo-wrap { width: 92px; height: 46px; }
.edu-logo-wrap { width: 96px; height: 54px; }
.org-logo,
.edu-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.edu-plus {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk";
  font-weight: 700;
  font-size: 1.2rem;
  color: #dfe7e2;
}

.education-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.education-card { grid-column: span 4; min-height: 280px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.01)); }
.education-card.education-featured { grid-column: span 6; }
.education-index { color: #d9e3dc; font-size: .76rem; font-weight: 800; }
.education-card h3 { margin: 0; font-size: 1.7rem; }
.education-card h4 { margin-bottom: 18px; color: #dbe4de; margin-top: 18px; }
.education-card p, .education-card li { color: var(--muted); }
.education-card ul { margin: 0; padding-left: 18px; }

.contact-section { padding-top: 70px; }
.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(46,204,113,.16);
  border-radius: 34px;
  background: radial-gradient(circle at 92% 12%, rgba(46,204,113,.09), transparent 18%), linear-gradient(140deg, #121212, #090909);
  padding: 70px;
  padding-right: 290px;
  box-shadow: var(--shadow);
}
.contact-photo-wrap {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 190px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}
.contact-photo {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 18%;
}
.contact-card h2 { margin: 14px 0 12px; font-size: clamp(2.4rem, 4.5vw, 4.5rem); }
.contact-card p { max-width: 720px; color: var(--muted); font-size: 1.05rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 28px 0 34px; }
.contact-links a, .contact-links span { color: #dce5df; text-decoration: none; }
.contact-links a:hover { color: #eff7f1; }
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .82rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.footer-signature { font-size: 2.2rem; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .section-grid { grid-template-columns: 1fr; gap: 42px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metric-card:nth-child(4) { border-top: 1px solid var(--line); }
  .case-summary { grid-template-columns: 1fr 160px 28px; gap: 22px; }
  .education-card, .education-card.education-featured { grid-column: span 6; }
  .contact-card { padding-right: 250px; }
  .contact-photo-wrap { width: 160px; top: 24px; right: 24px; border-radius: 20px; }
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { order: 0; }
  .hero-visual { order: 1; min-height: 390px; }
  .portrait-scene { width: min(100%, 340px); aspect-ratio: 1 / 1; }
}

@media (max-width: 900px) {
  .site-header { background: rgba(6,6,6,.9); backdrop-filter: blur(16px); border-bottom-color: var(--line); }
  .menu-toggle { width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 12px; }
  .menu-toggle span { display: block; width: 18px; height: 2px; background: var(--text); transition: .2s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 76px 0 auto; display: grid; gap: 0; padding: 14px 20px 22px; background: rgba(6,6,6,.98); border-bottom: 1px solid var(--line); transform: translateY(-145%); transition: transform .25s ease; box-shadow: 0 24px 54px rgba(0,0,0,.3); }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav .nav-resume-link { min-height: 48px; margin-top: 14px; padding: 0 18px; border-bottom: 1px solid rgba(90,230,145,.55); border-radius: 13px; width: 100%; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .section { padding: 68px 0; }
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .hero { padding-top: 98px; }
  h1 { font-size: clamp(2.25rem, 9vw, 3.2rem); line-height: 1.04; }
  .hero-subtitle { font-size: 1rem; }
  .hero-visual { min-height: 300px; }
  .portrait-scene { width: min(100%, 280px); aspect-ratio: 1 / 1; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card + .metric-card { border-left: 0; border-top: 1px solid var(--line); }
  .case-summary { grid-template-columns: 1fr 24px; padding: 22px; }
  .case-summary-main { grid-column: 1 / 2; }
  .case-result { grid-column: 1 / 2; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
  .case-icon { grid-column: 2 / 3; grid-row: 1; }
  .case-content { padding: 34px 22px 26px; }
  .result-grid { grid-template-columns: 1fr; }
  .hub-diagram {
    --diagram-size: min(100%, 360px);
    --center-size: clamp(112px, 34vw, 132px);
    --node-size: clamp(66px, 18vw, 76px);
  }
  .sheet-concept {
    width: calc(100% + 8px);
    margin-left: -4px;
    margin-right: -4px;
    padding: 10px;
    border-radius: 14px;
  }
  .sheet-row {
    grid-template-columns: 1.08fr .95fr .82fr 1.1fr;
    gap: 6px;
    margin-top: 6px;
  }
  .sheet-row span {
    min-height: 40px;
    padding: 6px 8px;
    font-size: .72rem;
    align-items: center;
    word-break: break-word;
  }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .education-card, .education-card.education-featured { grid-column: 1 / -1; min-height: auto; }
  .contact-card {
    padding: 132px 24px 42px;
    padding-right: 24px;
  }
  .contact-photo-wrap {
    top: 20px;
    right: 20px;
    width: 112px;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
  }
  .site-footer .container { flex-direction: column; }
}

@media (min-width: 1500px) {
  :root { --container: 1320px; }
  h1 { font-size: clamp(4.6rem, 4.2vw, 5.2rem); }
  .portrait-scene { width: min(100%, 440px); }
  .hero-visual { min-height: 520px; }
}

@media (min-width: 921px) and (max-height: 820px) {
  .hero { padding-top: 104px; }
  .hero-visual { min-height: 390px; }
  .portrait-scene { width: min(100%, 360px); }
  .metrics-grid { margin-top: 44px; }
  .section { padding: 72px 0; }
}

@media (max-width: 520px) {
  .brand-short { font-size: 2rem; }
  .eyebrow { font-size: .7rem; letter-spacing: .14em; }
  h1 { font-size: clamp(2.15rem, 10.6vw, 2.8rem); }
  .tag-list { gap: 8px; }
  .tag-list span { padding: 8px 11px; font-size: .77rem; }
  .metric-card { min-height: 148px; padding: 24px; }
  .metric-card::after { left: 24px; right: 24px; }
  .case-summary { padding: 18px; }
  .case-content { padding: 30px 18px 24px; }
  .education-card { padding: 22px; }
  .contact-photo-wrap { width: 100px; }
  .contact-card { padding-top: 126px; }
}

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