/* ==========================================================================
   Ing. Iván Arturo Chávez Roldán — Portafolio profesional
   ========================================================================== */

:root {
  --ink: #0e141b;
  --asphalt: #151b22;
  --asphalt-2: #1c232c;
  --asphalt-3: #28313b;
  --paper: #f6f4ef;
  --surface: #ffffff;
  --line: #e4dfd4;
  --line-dark: rgba(255, 255, 255, 0.10);
  --text: #1a2027;
  --muted: #5a636e;
  --on-dark: #ece9e2;
  --on-dark-muted: #a4acb6;
  --gold: #c9973f;
  --gold-strong: #94691f;
  --gold-soft: #f4ead6;
  --navy: #1f3a5a;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .05), 0 10px 30px rgba(16, 24, 32, .07);
  --shadow-lg: 0 2px 4px rgba(16, 24, 32, .06), 0 24px 60px rgba(16, 24, 32, .14);
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.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; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 24px rgba(201, 151, 63, .28); }
.btn-primary:hover { background: #d8a750; transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, .28); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, .06); }
.btn-dark { background: var(--asphalt); color: var(--on-dark); }
.btn-dark:hover { background: var(--asphalt-3); transform: translateY(-1px); }
.btn-outline { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--text); }
.btn-whatsapp { background: #1f8f4e; color: #fff; }
.btn-whatsapp:hover { background: #197a42; transform: translateY(-1px); }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(14, 20, 27, .92);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line-dark);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: grid; place-items: center; position: relative;
  background: var(--asphalt-3); border: 1px solid var(--line-dark);
  font: 700 17px/1 var(--serif); letter-spacing: .02em;
}
.brand-mark::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 7px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 9px);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font: 600 16px/1.2 var(--serif); }
.brand-role { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--on-dark-muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--on-dark); }
.nav a.is-active { background: rgba(255, 255, 255, .06); }
.nav .btn { margin-left: 10px; min-height: 42px; padding: 0 18px; font-size: 14px; color: var(--ink); }
.nav .btn:hover { color: var(--ink); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-dark);
  background: transparent; color: var(--on-dark); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--asphalt); color: var(--on-dark);
  padding: calc(var(--header-h) + 72px) 0 0;
}
.hero::before { /* textura asfáltica sutil */
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero::after { /* resplandor */
  content: ""; position: absolute; z-index: -1; width: 900px; height: 900px; right: -320px; top: -360px;
  background: radial-gradient(closest-side, rgba(201, 151, 63, .16), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: 64px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.hero h1 { font-size: clamp(40px, 5.6vw, 68px); margin: 22px 0 18px; font-weight: 600; letter-spacing: -0.02em; }
.hero h1 .light { display: block; font-weight: 400; color: var(--on-dark-muted); font-size: .58em; letter-spacing: -0.01em; margin-bottom: 6px; }
.hero-tagline { font: 400 clamp(20px, 2.1vw, 25px)/1.4 var(--serif); color: var(--on-dark); max-width: 620px; }
.hero-tagline em { font-style: italic; color: var(--gold); }
.hero-lead { margin-top: 18px; color: var(--on-dark-muted); font-size: 17px; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.credential-card {
  position: relative; padding: 30px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--line-dark);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.credential-head { display: flex; align-items: center; gap: 18px; padding-bottom: 22px; border-bottom: 1px dashed rgba(255, 255, 255, .16); }
.avatar {
  width: 92px; height: 92px; border-radius: 50%; flex: none; overflow: hidden;
  border: 2px solid var(--gold); box-shadow: 0 0 0 5px rgba(201, 151, 63, .14);
  background: var(--asphalt-3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.credential-name { font: 600 21px/1.25 var(--serif); }
.credential-sub { font-size: 13.5px; color: var(--on-dark-muted); margin-top: 4px; }
.credential-cip {
  display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(201, 151, 63, .14); color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.credential-list { display: grid; gap: 14px; padding-top: 22px; }
.credential-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 14.5px; color: var(--on-dark); }
.credential-list li span { display: block; color: var(--on-dark-muted); font-size: 13px; }
.credential-list svg { width: 20px; height: 20px; color: var(--gold); margin-top: 2px; }
.credential-foot {
  margin-top: 24px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--on-dark-muted);
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #41c27a; box-shadow: 0 0 0 4px rgba(65, 194, 122, .18); flex: none; }

/* Franja de cifras con línea de carril */
.stats { margin-top: 88px; position: relative; }
.stats::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 46px, transparent 46px 74px);
  opacity: .9;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 38px 28px 44px; border-left: 1px solid var(--line-dark); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-value { font: 600 clamp(36px, 4vw, 50px)/1 var(--serif); color: var(--on-dark); }
.stat-value small { font-size: .55em; color: var(--gold); margin-left: 2px; }
.stat-label { margin-top: 10px; font-size: 14px; color: var(--on-dark-muted); max-width: 230px; }

/* ---------- Secciones ---------- */
.section { padding: 112px 0; }
.section-white { background: var(--surface); }
.section-dark { background: var(--asphalt); color: var(--on-dark); position: relative; isolation: isolate; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker { justify-content: center; }
.kicker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-strong);
}
.kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section-dark .kicker { color: var(--gold); }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); }
.section-head p { margin-top: 18px; font-size: 17.5px; color: var(--muted); }
.section-dark .section-head p { color: var(--on-dark-muted); }

/* ---------- Servicios ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px 28px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card.featured { background: var(--asphalt); color: var(--on-dark); border-color: var(--asphalt); }
.service-card.featured p { color: var(--on-dark-muted); }
.service-card.featured .service-tags li { background: rgba(255, 255, 255, .07); color: var(--on-dark); }
.service-num { position: absolute; top: 26px; right: 28px; font: 600 14px/1 var(--serif); color: var(--gold-strong); letter-spacing: .06em; }
.service-card.featured .service-num { color: var(--gold); }
.service-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 24px;
  background: var(--gold-soft); color: var(--gold-strong);
}
.service-card.featured .service-icon { background: rgba(201, 151, 63, .16); color: var(--gold); }
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 22px; margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: 15.5px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.service-tags li { font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); }

.sectors {
  margin-top: 56px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  padding: 26px 30px; border-radius: var(--radius); border: 1px dashed #cfc6b4; background: rgba(255, 255, 255, .5);
}
.sectors-title { font: 600 18px/1.3 var(--serif); }
.sectors ul { display: flex; flex-wrap: wrap; gap: 10px; }
.sectors li {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500;
}
.sectors li svg { width: 16px; height: 16px; color: var(--gold-strong); }

/* ---------- Frase ---------- */
.statement { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statement-inner { margin: 0; padding: 64px 0; text-align: center; position: relative; }
.statement-inner::before, .statement-inner::after {
  content: ""; display: block; width: 120px; height: 3px; margin: 0 auto;
  background: repeating-linear-gradient(90deg, var(--gold) 0 22px, transparent 22px 34px);
}
.statement-inner p { font: italic 400 clamp(26px, 3.4vw, 40px)/1.3 var(--serif); color: var(--text); max-width: 900px; margin: 32px auto 14px; letter-spacing: -0.01em; }
.statement-inner cite { display: block; font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 32px; }

/* ---------- Perfil ---------- */
.profile-title { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 26px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.profile-text p { color: #39414b; font-size: 17px; margin-bottom: 18px; }
.profile-text p strong { color: var(--text); font-weight: 600; }
.quote {
  margin: 34px 0 0; padding: 28px 30px; border-radius: var(--radius);
  background: var(--paper); border-left: 4px solid var(--gold); position: relative;
}
.quote p { font: italic 400 21px/1.5 var(--serif); color: var(--text); margin: 0; }
.quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

.profile-aside { display: grid; gap: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--surface); }
.panel-title { display: flex; align-items: center; gap: 10px; font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.panel-title svg { width: 18px; height: 18px; color: var(--gold-strong); }
.edu-list { display: grid; gap: 18px; }
.edu-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.edu-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--asphalt); color: var(--gold); font: 700 13px/1 var(--sans); letter-spacing: .04em;
}
.edu-list strong { display: block; font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.3; }
.edu-list span { font-size: 14px; color: var(--muted); }
.edu-badge svg { width: 20px; height: 20px; }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-cloud li { font-size: 13.5px; padding: 7px 12px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); }

/* ---------- Aportes (línea de tiempo vial) ---------- */
.section-dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.road-timeline { position: relative; display: grid; gap: 0; max-width: 980px; margin-inline: auto; }
.road-timeline::before { /* línea central tipo carril */
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 4px; margin-left: -2px;
  background: repeating-linear-gradient(180deg, var(--gold) 0 26px, transparent 26px 44px);
  opacity: .85;
}
.milestone { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 18px 0; }
.milestone::after {
  content: ""; position: absolute; left: 50%; top: 40px; width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%; background: var(--asphalt); border: 3px solid var(--gold);
}
.milestone + .milestone { margin-top: -84px; }
.milestone-body {
  background: var(--asphalt-2); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 24px 26px;
}
.milestone:nth-child(odd) .milestone-body { grid-column: 1; text-align: right; }
.milestone:nth-child(even) .milestone-body { grid-column: 2; }
.milestone-year { font: 600 15px/1 var(--sans); letter-spacing: .08em; color: var(--gold); }
.milestone h3 { font-size: 21px; margin: 10px 0 8px; color: var(--on-dark); }
.milestone p { color: var(--on-dark-muted); font-size: 15px; }

.contributions { margin-top: 80px; }
.contributions-title { font: 600 24px/1.3 var(--serif); text-align: center; margin-bottom: 28px; }
.contrib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contrib {
  padding: 22px 20px; border-radius: var(--radius); border: 1px solid var(--line-dark);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
}
.contrib-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(201, 151, 63, .14); color: var(--gold); margin-bottom: 16px; }
.contrib-icon svg { width: 20px; height: 20px; }
.contrib h4 { font-size: 17px; line-height: 1.3; color: var(--on-dark); }
.contrib p { margin-top: 8px; font-size: 13px; color: var(--on-dark-muted); }

/* ---------- Proyectos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -24px 0 36px; }
.filter-btn {
  font: 500 14px/1 var(--sans); padding: 11px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter-btn:hover { color: var(--text); border-color: #cbc3b3; }
.filter-btn.is-active { background: var(--asphalt); border-color: var(--asphalt); color: var(--on-dark); }
.filter-btn .count { margin-left: 6px; font-size: 12px; opacity: .6; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; transition: box-shadow .25s, transform .25s;
}
.project:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.project[hidden] { display: none; }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.tag { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; }
.tag-peritaje { background: #f6e3e0; color: #8a3324; }
.tag-aeropuerto { background: #e1e9f3; color: #1f3a5a; }
.tag-conservacion { background: var(--gold-soft); color: var(--gold-strong); }
.tag-supervision { background: #e2efe7; color: #23613f; }
.project-year { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.project h3 { font-size: 19px; line-height: 1.3; }
.project-desc { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.project-meta { margin-top: auto; padding-top: 18px; display: grid; gap: 6px; border-top: 1px solid var(--line); margin-top: 20px; }
.project-meta li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: #3b434d; }
.project-meta svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--gold-strong); }
.project.highlight { background: var(--asphalt); color: var(--on-dark); border-color: var(--asphalt); grid-column: span 2; }
.project.highlight .project-desc, .project.highlight .project-year { color: var(--on-dark-muted); }
.project.highlight .project-meta { border-top-color: var(--line-dark); }
.project.highlight .project-meta li { color: var(--on-dark); }
.project.highlight .project-meta svg { color: var(--gold); }
.project.highlight h3 { font-size: 25px; }
.project-cta { background: var(--gold-soft); border-color: #ead9b5; justify-content: flex-start; }
.project-cta .service-icon { background: var(--surface); margin-bottom: 18px; }
.project-cta h3 { font-size: 21px; }
.project-cta .btn { margin-top: 22px; align-self: flex-start; }
.projects-grid { grid-auto-flow: dense; }

/* ---------- Investigación ---------- */
.research { margin-bottom: 28px; padding: 32px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.research-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.research-head h3 { font-size: 23px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--navy); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow svg { width: 16px; height: 16px; }
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.paper { padding: 24px; border-radius: var(--radius); background: var(--paper); border-top: 3px solid var(--gold); }
.paper-type { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-strong); }
.paper h4 { font-size: 18px; line-height: 1.35; margin: 10px 0 10px; }
.paper p { font-size: 14px; color: var(--muted); }

/* ---------- Trayectoria ---------- */
.career { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.career-item { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.career-period { font-size: 14px; font-weight: 600; color: var(--gold-strong); font-variant-numeric: tabular-nums; padding-top: 2px; }
.career-company { font: 600 17.5px/1.3 var(--serif); }
.career-role { font-size: 14.5px; color: var(--muted); margin-top: 3px; }

/* ---------- Conferencias ---------- */
.speaking-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.speak-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.speak-card h3 { font-size: 21px; margin-bottom: 6px; }
.speak-card > p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.event-list { display: grid; gap: 0; }
.event-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.event-list li span:last-child { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.event-list .role { display: block; font-size: 12.5px; color: var(--gold-strong); font-weight: 600; }

.reach { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.reach-card { border-radius: var(--radius); padding: 28px; background: var(--asphalt); color: var(--on-dark); }
.reach-card h3 { font-size: 20px; margin-bottom: 6px; }
.reach-card > p { color: var(--on-dark-muted); font-size: 14.5px; margin-bottom: 18px; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cloud li { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line-dark); }
.chip-cloud.gold li { background: rgba(201, 151, 63, .12); border-color: rgba(201, 151, 63, .28); color: #f1dcb2; }

.courses { margin-top: 28px; }
.courses-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  font: 600 18px/1.3 var(--serif); color: var(--text); cursor: pointer; text-align: left;
}
.courses-toggle svg { width: 22px; height: 22px; transition: transform .25s; flex: none; color: var(--gold-strong); }
.courses-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.courses-toggle small { display: block; font: 400 14px/1.4 var(--sans); color: var(--muted); margin-top: 4px; }
.courses-panel { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); padding: 6px 28px 24px; margin-top: -8px; }
.courses-panel[hidden] { display: none; }
.course-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.course-list li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.course-list li span { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.contact-intro h2 { font-size: clamp(30px, 3.6vw, 44px); }
.contact-intro > p { margin-top: 18px; color: var(--on-dark-muted); font-size: 17px; }
.channels { margin-top: 36px; display: grid; gap: 12px; }
.channel {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-dark);
  background: var(--asphalt-2); text-decoration: none; transition: border-color .2s, background-color .2s;
}
a.channel:hover { border-color: rgba(201, 151, 63, .5); background: #212a34; }
.channel-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(201, 151, 63, .14); color: var(--gold); }
.channel-icon svg { width: 22px; height: 22px; }
.channel-label, .channel-value { display: block; }
.channel-label { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.channel-value { font-size: 16.5px; font-weight: 600; color: var(--on-dark); word-break: break-word; }
.channel-arrow { width: 18px; height: 18px; color: var(--on-dark-muted); }

.form-card { background: var(--surface); color: var(--text); border-radius: 20px; padding: 38px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.form-card h3 { font-size: 25px; }
.form-card > p { color: var(--muted); font-size: 15px; margin: 8px 0 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; color: #39414b; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 15.5px/1.4 var(--sans); color: var(--text);
  padding: 13px 14px; border-radius: var(--radius-sm); border: 1px solid #d9d2c4; background: #fcfbf8;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a636e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 151, 63, .18); background: #fff; }
.field input:user-invalid, .field textarea:user-invalid { border-color: #c2412d; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.form-actions .btn { flex: 1 1 200px; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.form-status { margin-top: 12px; font-size: 14px; font-weight: 500; color: #23613f; min-height: 1em; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 56px 0 32px; font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line-dark); }
.footer-top .brand-role { margin-top: 2px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { text-decoration: none; color: var(--on-dark-muted); }
.footer-nav a:hover { color: var(--on-dark); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 13px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #1f8f4e; color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .2s, background-color .2s;
}
.wa-float:hover { transform: scale(1.06); background: #197a42; }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Animaciones de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 20px var(--gutter) 32px;
    background: var(--ink); border-top: 1px solid var(--line-dark); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open .site-header { background: var(--ink); }
  .nav a { font-size: 18px; padding: 14px 12px; border-bottom: 1px solid var(--line-dark); border-radius: 0; }
  .nav .btn { margin: 20px 0 0; min-height: 52px; font-size: 16px; border-bottom: 0; border-radius: 999px; }
}

@media (max-width: 980px) {
  .section { padding: 88px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .credential-card { max-width: 560px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 30px 24px 32px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .services-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .speaking-grid, .research-grid { grid-template-columns: 1fr; }
  .contrib-grid { grid-template-columns: repeat(2, 1fr); }
  .reach { grid-template-columns: 1fr; }
  .career { grid-template-columns: 1fr; }
  .sectors { grid-template-columns: 1fr; gap: 16px; }

  .road-timeline::before { left: 7px; margin-left: 0; }
  .milestone { grid-template-columns: 1fr; gap: 0; padding: 12px 0 12px 40px; }
  .milestone + .milestone { margin-top: 0; }
  .milestone::after { left: 0; margin-left: 0; top: 36px; }
  .milestone:nth-child(odd) .milestone-body, .milestone:nth-child(even) .milestone-body { grid-column: 1; text-align: left; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 68px; }
  body { font-size: 15.5px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head p { font-size: 16px; }
  .hero { padding-top: calc(var(--header-h) + 44px); }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand-role { display: none; }
  .section-head.center .kicker::before { display: none; }
  .brand-name { font-size: 15px; }
  .credential-card { padding: 24px 20px; }
  .avatar { width: 76px; height: 76px; }
  .stats { margin-top: 64px; }
  .stat { padding: 26px 14px 28px; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat-label { font-size: 13px; }
  .services-grid, .projects-grid { grid-template-columns: 1fr; }
  .project.highlight { grid-column: auto; }
  .project.highlight h3 { font-size: 21px; }
  .contrib-grid { grid-template-columns: 1fr; }
  .filters { margin-top: -12px; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex: none; }
  .career-item { grid-template-columns: 1fr; gap: 4px; }
  .course-list { grid-template-columns: 1fr; }
  .courses-toggle, .courses-panel { padding-inline: 20px; }
  .form-card { padding: 26px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .quote { padding: 22px; }
  .research { padding: 22px 18px; }
  .statement-inner { padding: 48px 0; }
  .quote p { font-size: 18.5px; }
  .panel, .speak-card, .reach-card { padding: 22px 20px; }
  .event-list li { grid-template-columns: 1fr; gap: 2px; }
  .channel { grid-template-columns: 44px 1fr; padding: 14px; }
  .channel-icon { width: 44px; height: 44px; }
  .channel-arrow { display: none; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
