/* =============================================================================
   Felipe A. Carreño López — sitio personal
   Paleta: petróleo profundo (agua / CFD) + ámbar azufre (S⁰)
   ========================================================================== */

:root {
  --ink:        #10262e;
  --primary:    #14505f;
  --primary-dk: #0c3a46;
  --primary-lt: #e6eef0;
  --accent:     #c8871a;
  --accent-lt:  #fbf1de;
  --bg:         #ffffff;
  --surface:    #f5f8f8;
  --surface-2:  #eef3f4;
  --border:     #dbe4e6;
  --muted:      #5b7076;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(16, 38, 46, .05), 0 8px 24px -12px rgba(16, 38, 46, .18);
}

/* ------------------------------------------------------------------ reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- layout -- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.wrap--narrow { max-width: 780px; }
.section { padding: 4.5rem 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { max-width: 720px; margin-bottom: 2.5rem; }
.section__head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.eyebrow {
  font-size: .72rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .7rem; font-family: var(--sans);
}

/* ------------------------------------------------------------------- nav -- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1.25rem; min-height: 66px; }
.nav__brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
  color: var(--ink); margin-right: auto; line-height: 1.15; white-space: nowrap;
}
.nav__brand:hover { text-decoration: none; color: var(--primary); }
.nav__brand span { display: block; font-family: var(--sans); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav__links { display: flex; gap: 1.4rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-size: .92rem; color: var(--ink); padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover { text-decoration: none; border-bottom-color: var(--accent); }
.nav__links a.is-active { border-bottom-color: var(--primary); font-weight: 550; }
.nav__lang {
  font-size: .78rem; font-weight: 650; letter-spacing: .06em;
  border: 1px solid var(--border); border-radius: 999px; padding: .28rem .7rem;
  color: var(--muted);
}
.nav__lang:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--ink); }

@media (max-width: 880px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: .5rem 1.5rem 1rem; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: .6rem 0; width: 100%; }
}

/* ------------------------------------------------------------------ hero -- */
.hero {
  background:
    linear-gradient(180deg, rgba(12,58,70,.96) 0%, rgba(16,38,46,.97) 100%);
  color: #eef4f5;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5; pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.35fr .65fr; gap: 3.5rem; align-items: center;
  padding: 5rem 0 4.5rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .eyebrow { color: var(--accent); }
.hero__lead { font-size: 1.08rem; color: #cbdadd; max-width: 54ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__portrait {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.6);
  filter: grayscale(.15) contrast(1.02);
}
.hero__caption { font-size: .82rem; color: #9fb5b9; margin-top: .8rem; }
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 0; }
  .hero__portrait-wrap { max-width: 240px; }
}

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .93rem; font-weight: 550; font-family: var(--sans);
  padding: .68rem 1.25rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; transition: .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #22190a; border-color: var(--accent); }
.btn--primary:hover { background: #dda330; border-color: #dda330; }
.btn--ghost { background: transparent; color: #eef4f5; border-color: rgba(255,255,255,.35); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); background: var(--primary-lt); }

/* --------------------------------------------------------------- metrics -- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.metric { background: #fff; padding: 1.6rem 1.2rem; text-align: center; }
.metric__value { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; color: var(--primary); line-height: 1; }
.metric__label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .5rem; }
@media (max-width: 640px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------------------------------------------ about grid -- */
.about { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }
.about__side { border-left: 3px solid var(--accent); padding-left: 1.2rem; }
.about__side dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 1.1rem; }
.about__side dt:first-child { margin-top: 0; }
.about__side dd { margin: .15rem 0 0; font-size: .95rem; }
.about__body p { font-size: 1.03rem; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; gap: 2rem; } }

/* ----------------------------------------------------------- card grids -- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; transition: .18s ease; position: relative;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #c6d5d8; }
.card__icon { color: var(--primary); margin-bottom: 1rem; }
.card__icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: .5rem; font-size: 1.14rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.card__link { margin-top: auto; font-size: .88rem; font-weight: 550; color: var(--primary); }
.card__link::after { content: " →"; }
.card--future { background: var(--accent-lt); border-color: #ecd9b3; }
.card--future .card__icon { color: var(--accent); }

/* ---------------------------------------------------------------- chips -- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.chips li {
  font-size: .74rem; letter-spacing: .03em; color: var(--primary);
  background: var(--primary-lt); border-radius: 999px; padding: .22rem .65rem;
}

/* --------------------------------------------------- research long-form -- */
.research-block {
  display: grid; grid-template-columns: 260px 1fr; gap: 3rem;
  padding: 3rem 0; border-top: 1px solid var(--border);
}
.research-block:first-of-type { border-top: 0; padding-top: 1rem; }
.research-block__aside .card__icon svg { width: 38px; height: 38px; }
.research-block__aside h2 { font-size: 1.35rem; }
.research-block__body p:last-child { margin-bottom: 0; }
@media (max-width: 880px) { .research-block { grid-template-columns: 1fr; gap: 1.2rem; padding: 2rem 0; } }

/* ---------------------------------------------------------- publications -- */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub {
  display: grid; grid-template-columns: 68px 1fr; gap: 1.5rem;
  padding: 1.4rem 0; border-top: 1px solid var(--border);
}
.pub:first-child { border-top: 0; }
.pub__year { font-family: var(--serif); font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.pub__title { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; margin: 0 0 .35rem; line-height: 1.35; }
.pub__authors { font-size: .9rem; color: var(--muted); margin: 0 0 .35rem; }
.pub__authors b { color: var(--ink); font-weight: 650; }
.pub__meta { font-size: .88rem; margin: 0; }
.pub__journal { font-style: italic; color: var(--ink); }
.pub__badge {
  display: inline-block; font-size: .7rem; font-weight: 650; letter-spacing: .05em;
  background: var(--primary-lt); color: var(--primary-dk);
  border-radius: 3px; padding: .1rem .4rem; margin-left: .4rem;
}
.pub__doi { font-size: .85rem; color: var(--primary); word-break: break-word; }
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; gap: .4rem; } .pub__year { font-size: 1rem; } }

.note {
  font-size: .88rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .7rem 1rem; display: inline-block; margin-bottom: 2rem;
}

/* ---------------------------------------------------------------- items -- */
.entry { padding: 1.35rem 0; border-top: 1px solid var(--border); }
.entry:first-child { border-top: 0; }
.entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; justify-content: space-between; }
.entry__title { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; margin: 0; }
.entry__period { font-size: .85rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry__sub { font-size: .93rem; color: var(--muted); margin: .2rem 0 0; }
.entry__notes { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .93rem; color: var(--muted); }
.entry__notes li { margin-bottom: .25rem; }

.role-tag {
  font-size: .7rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  padding: .12rem .45rem; border-radius: 3px; margin-right: .4rem;
}
.role-tag--main { background: var(--accent-lt); color: #8a5c0c; }
.role-tag--co   { background: var(--surface-2); color: var(--muted); }

/* ----------------------------------------------------------------- news -- */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; padding: 1.2rem 0; border-top: 1px solid var(--border); }
.news li:first-child { border-top: 0; }
.news__date { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.news__tag { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 650; margin-bottom: .15rem; }
.news h3 { font-size: 1.02rem; margin-bottom: .25rem; }
.news p { font-size: .93rem; color: var(--muted); margin: 0 0 .35rem; }
.news p:last-child { margin-bottom: 0; }
.news__authors { font-size: .88rem; color: var(--muted); }
.news__authors b { color: var(--ink); font-weight: 650; }
.news__meta { font-size: .85rem; }
.news__cite { font-style: italic; color: var(--ink); }
.news__doi { font-size: .85rem; color: var(--primary); word-break: break-word; }
@media (max-width: 640px) { .news li { grid-template-columns: 1fr; gap: .3rem; } }

/* --------------------------------------------------------------- logos --- */
.orgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; list-style: none; padding: 0; margin: 0; }
.orgs li { border-left: 2px solid var(--border); padding-left: 1rem; }
.orgs strong { display: block; font-family: var(--serif); font-size: 1.02rem; }
.orgs span { font-size: .88rem; color: var(--muted); }

/* ------------------------------------------------------ banda de logos --- */
/* fondo blanco a propósito: el PNG de G-Tech trae caja blanca opaca y el de
   ANID es la versión clara invertida, ambos solo calzan sobre blanco */
.logos-band { background: var(--bg); border-top: 1px solid var(--border); }
.logos {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4rem; list-style: none; margin: 0; padding: 2.8rem 0;
}
.logos img { height: 62px; width: auto; opacity: .9; }
.logos img.is-tall { height: 104px; }
@media (max-width: 640px) {
  .logos { gap: 2rem; padding: 2rem 0; }
  .logos img { height: 44px; }
  .logos img.is-tall { height: 74px; }
}

/* ----------------------------------------------------------------- CTA --- */
.cta {
  background: var(--primary); color: #e9f1f2;
  border-radius: var(--radius); padding: 2.5rem 2.2rem;
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
}
.cta h2 { color: #fff; margin-bottom: .4rem; }
.cta p { margin: 0; color: #c2d6d9; max-width: 60ch; font-size: .98rem; }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- contact -- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .9rem 0; border-top: 1px solid var(--border); }
.contact-list li:first-child { border-top: 0; }
.contact-list dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* --------------------------------------------------------------- footer -- */
.site-footer { background: var(--ink); color: #a9c0c5; padding: 3rem 0 2rem; font-size: .9rem; margin-top: 0; }
.site-footer a { color: #d6e4e6; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer__brand { font-family: var(--serif); font-size: 1.15rem; color: #fff; margin-bottom: .4rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .82rem; color: #7d979d; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ------------------------------------------------------------ page head -- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3.5rem 0 3rem; }
.page-head h1 { margin-bottom: .6rem; }
.page-head p { color: var(--muted); font-size: 1.08rem; max-width: 62ch; margin: 0; }

/* -------------------------------------------------------------- utility -- */
.stack > * + * { margin-top: 2.5rem; }
.text-muted { color: var(--muted); }
.subhead { font-family: var(--sans); font-size: .76rem; font-weight: 650; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 2.5rem 0 1rem; }
.subhead:first-child { margin-top: 0; }

@media print {
  .site-header, .site-footer, .hero__actions, .cta { display: none; }
  body { font-size: 11pt; }
}

.section__cta { margin: 2rem 0 0; text-align: center; }
