@font-face {
  font-family: Inter;
  src: url('./assets/fonts/inter-latin-ext.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter;
  src: url('./assets/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #102e2b;
  --copy: #405b55;
  --deep: #0a2625;
  --mint: #b8ebcf;
  --surface: #f6f9f7;
  --line: #cfded6;
  --accent: #145947;
  --display: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 1rem/1.65 var(--body); }
a { color: inherit; text-underline-offset: .23em; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: .27rem; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.14; }
ul, ol { padding: 0; }
.wrap { width: min(calc(100% - 6rem), 72rem); margin-inline: auto; }
.section { padding-block: clamp(3.7rem, 7vw, 6rem); }
section[id], footer[id] { scroll-margin-top: 1.2rem; }
.skip { position: absolute; z-index: 3; padding: .65rem 1rem; border-radius: .5rem; background: white; transform: translateY(-220%); }
.skip:focus { transform: translate(.8rem, .8rem); }

.site-header, .hero, .site-footer { background: var(--deep); color: #f0f9f5; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: .7rem 2rem; min-height: 4.5rem; border-bottom: 1px solid #d6f7e52e; }
.wordmark { flex: none; font: 800 1.1rem/1.2 var(--display); letter-spacing: -.025em; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem clamp(.8rem, 2.6vw, 2rem); }
nav a { color: #dcebe7; text-decoration: none; font-size: .875rem; font-weight: 550; padding-block: .38rem; }
nav a:hover { color: white; text-decoration: underline; }
.nav-contact { border: 1px solid #c8f2df5e; border-radius: 999px; padding-inline: .95rem; }

.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 82% 70%, #25705c7a, transparent 56%),
    repeating-radial-gradient(ellipse at 85% 122%, transparent 0 19px, #c0f7dc2c 20px 21px, transparent 22px 40px);
  mask-image: linear-gradient(90deg, transparent 10%, #0008 56%, black 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(15rem, 1fr);
  align-items: center;
  gap: clamp(2.2rem, 6vw, 5.8rem);
  padding-block: clamp(2.9rem, 6vw, 5.1rem);
}
.eyebrow, .category, .paper-meta { font-size: .88rem; font-weight: 650; }
.eyebrow { display: flex; align-items: center; gap: .65rem; text-transform: uppercase; letter-spacing: .13em; color: var(--mint); }
.eyebrow::before { content: ''; width: 1.6rem; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(3.6rem, 7.6vw, 6.6rem); font-weight: 800; line-height: .99; letter-spacing: -.053em; word-spacing: .035em; margin-block: 1.05rem 1.22rem; }
.hero-summary { max-width: 32rem; color: #dceae6; font-size: clamp(1rem, 1.65vw, 1.19rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; min-height: 2.88rem; padding: .62rem 1.13rem; border: 1px solid transparent; border-radius: .66rem; font-weight: 700; text-decoration: none; }
.primary { color: var(--deep); background: var(--mint); }
.primary:hover { background: #d6f5e4; }
.secondary { border-color: #c8f2df6b; }
.secondary:hover { background: #ffffff16; }
.portrait { position: relative; isolation: isolate; justify-self: end; width: min(100%, 24rem); border: 1px solid #d5f3e687; border-radius: 1.45rem; overflow: hidden; background: #38564b; box-shadow: 0 1.45rem 3.25rem #020f104d; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 4.42; object-fit: cover; object-position: 19% 50%; }
.portrait figcaption { position: absolute; inset: auto 0 0; padding: 2.45rem 1rem .8rem; background: linear-gradient(transparent, #091c1beb); color: #f0f7f3; font-size: .86rem; font-weight: 550; }

.section-header { margin-bottom: clamp(1.55rem, 4vw, 2.3rem); }
.section-header h2, .site-footer h2 { font-weight: 800; font-size: clamp(2.17rem, 4.75vw, 3.6rem); line-height: 1.06; letter-spacing: -.042em; word-spacing: .025em; }
.section-header p { margin-top: .65rem; color: var(--copy); max-width: 33rem; }
.project-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 3.5rem; }
.project-heading p { margin: 0; max-width: 26rem; }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project {
  display: flex;
  flex-direction: column;
  gap: .78rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.06rem;
  background: #fff;
}
.project:first-child { background: #e5f4eb; border-color: #bddbce; }
.category { color: var(--accent); margin-bottom: .44rem; }
.project h3 { font-size: clamp(1.4rem, 2.66vw, 2rem); font-weight: 780; letter-spacing: -.033em; }
.project p:not(.category) { color: var(--copy); }
.project a { display: inline-block; margin-top: .78rem; }
.project a, .profile-link { color: var(--accent); text-decoration-color: #4e8473; font-weight: 690; }
.project a:hover, .profile-link:hover, .papers a:hover { color: #0e614d; text-decoration-thickness: .13em; }
.project .atlas-resource { display: inline-grid; grid-template-columns: 4.25rem minmax(0, 1fr); align-items: center; gap: .85rem; max-width: 100%; margin-top: 1rem; text-decoration: none; }
.atlas-resource img { width: 100%; height: auto; aspect-ratio: 1; border-radius: .42rem; }
.atlas-resource strong { display: block; text-decoration: underline; font-weight: 710; }
.atlas-resource span span { display: block; color: var(--copy); font-size: .83rem; font-weight: 500; }

.publications { background: #e8f2ec; border-block: 1px solid var(--line); }
.publications-grid { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); align-items: start; gap: 1rem clamp(2rem, 6vw, 5.5rem); }
.profile-link { display: inline-block; margin-top: 1.03rem; }
.papers { list-style: none; border-top: 1px solid #b2c8bc; }
.papers li { display: grid; gap: .28rem; padding: .9rem 0 1rem; border-bottom: 1px solid #b2c8bc; }
#atlas-hidrogenio, #tese { scroll-margin-top: 1.2rem; }
.paper-meta { color: var(--accent); line-height: 1.35; }
.papers a { width: fit-content; font-size: 1.05rem; font-weight: 680; line-height: 1.45; text-decoration-color: #5f887a; }

.career-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.career-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 1.06rem; padding: clamp(1.15rem, 3vw, 2rem); }
.career-grid h3 { font-size: 1.24rem; letter-spacing: -.019em; margin-bottom: .78rem; }
.timeline div { padding: .73rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: .55rem; }
.timeline div:last-child { padding-bottom: 0; }
.timeline dt { font-size: .88rem; font-weight: 690; color: var(--accent); }
.timeline dd { color: var(--copy); line-height: 1.45; }

.site-footer { padding-block: 3.1rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.2rem 2rem; }
.site-footer h2 { font-size: clamp(1.95rem, 4vw, 3rem); }
.site-footer p { margin-top: .5rem; color: #d4e8dd; }
.contact-links { display: flex; gap: .65rem 1.25rem; list-style: none; flex-wrap: wrap; }
.contact-links a { color: var(--mint); font-weight: 650; }

@media (max-width: 60rem) {
  .wrap { width: min(calc(100% - 3.4rem), 72rem); }
  .publications-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}

@media (max-width: 46rem) {
  .wrap { width: min(calc(100% - 2.3rem), 72rem); }
  .masthead { display: grid; min-height: 0; padding-block: 1rem .65rem; }
  .nav-contact { border: 0; padding-inline: 0; }
  .hero-grid, .publications-grid, .career-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 1.65rem; }
  .hero h1 { font-size: clamp(2.85rem, 10.8vw, 5rem); }
  .hero::before { mask-image: linear-gradient(160deg, transparent 9%, #0007 48%, black); }
  .portrait { justify-self: start; }
  .project-heading { display: block; }
  .project-heading p { margin-top: .6rem; }
  .publications-grid .section-header { margin-bottom: .45rem; }
}

@media (max-width: 36rem) {
  .projects { grid-template-columns: minmax(0, 1fr); }
  .timeline div { grid-template-columns: 5.3rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
