@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --paper: #f6f0e6;
  --white: #fffcf7;
  --ink: #142a40;
  --deep: #102b43;
  --muted: #445968;
  --wine: #431b26;
  --gold: #edcfa1;
  --bronze: #761a29;
  --line: #ded6ce;
  --sage: #e5edf3;
  --heading: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.7 var(--body); }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--heading); font-weight: 400; line-height: 1.13; overflow-wrap: anywhere; }
h2 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.65rem, 2.8vw, 2.6rem); }
h4 { font-size: clamp(1.4rem, 2.2vw, 1.95rem); }
a { color: inherit; text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #761a29; outline-offset: 4px; }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 5; background: var(--white); padding: 10px; transform: translateY(-200%); }
.skip:focus { transform: none; }

header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 22px;
  align-items: center;
  padding-top: 16px;
}
.brand { font: 1.6rem/1.12 var(--heading); text-decoration: none; justify-self: start; }
nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  column-gap: 26px;
  row-gap: 4px;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-block: 7px;
  font-size: .88rem;
  font-weight: 700;
}
nav a { text-decoration: none; padding-block: 3px; }
nav a:hover { text-decoration: underline; }
.lang { grid-column: 2; grid-row: 1; display: flex; gap: 2px; padding: 3px; background: #e5edf3; border: 1px solid #d2dde5; border-radius: 30px; }
.lang a { text-decoration: none; padding: 5px 10px; border-radius: 24px; font-size: .77rem; font-weight: 700; }
.lang a[aria-current=page] { background: var(--deep); color: var(--white); }
.lang a:not([aria-current=page]):hover { background: #d6e2eb; }

.hero { background: linear-gradient(112deg, #fffcf7, #f2e7d9 88%); border-bottom: 1px solid #e1d2c5; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(0, .86fr); gap: clamp(28px, 6vw, 84px); align-items: center; padding-block: clamp(44px, 7vw, 101px); }
.kicker { font-size: .8rem; letter-spacing: .035em; line-height: 1.5; font-weight: 700; }
.hero .kicker { color: var(--bronze); display: flex; align-items: center; gap: 10px; }
.hero .kicker::before { content: ""; display: inline-block; width: 30px; height: 1px; background: currentColor; }
.hero h1 { color: var(--bronze); font-size: clamp(3.15rem, 6vw, 5.6rem); letter-spacing: -.037em; line-height: 1.01; margin: 20px 0; text-wrap: balance; }
.hero h1 span { display: block; font-style: italic; }
.credentials { color: var(--bronze); font-size: .91rem; font-weight: 700; margin-bottom: 12px; }
.introduction { max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.22rem); }
.hero-links, .bio-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; font-size: .9rem; font-weight: 700; }
.hero-links a, .bio-links a { border-radius: 24px; padding: 9px 16px; text-decoration: none; }
.primary { background: var(--deep); color: var(--white); border: 1px solid var(--deep); }
.primary:hover { background: #234561; }
.profile, .bio-links a { border: 1px solid #aab7c3; }
.profile:hover, .bio-links a:hover { background: var(--sage); }
.portrait { padding: 10px; background: var(--deep); border-radius: 160px 160px 14px 14px; box-shadow: 9px 9px 0 #dbc2c3; justify-self: center; width: min(100%, 420px); }
.portrait img { display: block; width: 100%; height: auto; background: #fff; border-radius: 150px 150px 8px 8px; border: 1px solid #b8999d; }

.section { padding-block: clamp(48px, 7vw, 96px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px 25px; margin-bottom: 27px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.section-heading a, .events-source a, .graduation-honors a { font-size: .88rem; font-weight: 700; }
.group-title { margin: 36px 0 14px; }
.research, .publications, .events { display: grid; gap: 16px; }
.research { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.publications, .events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.research article, .publications article, .events article {
  min-width: 0;
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}
.research .kicker, .publications .kicker, .events .kicker { margin-bottom: 9px; color: var(--bronze); }
.research p:last-child, .publications p:last-child, .events p:last-of-type { margin-top: 9px; color: var(--muted); }
.research ul { padding-left: 1.25em; margin: 9px 0; color: var(--muted); }
.publication-bg { background: var(--sage); }
.publications h3 { font-size: clamp(1.55rem, 2.55vw, 2.3rem); }
.publications a, .events a { display: inline-block; margin-top: 12px; font-size: .86rem; font-weight: 700; }
.project {
  padding: clamp(23px, 4vw, 51px);
  color: var(--white);
  background: radial-gradient(ellipse at top right, #294964, transparent 65%), var(--deep);
  border-radius: 18px;
  border-bottom: 3px solid #b78d47;
}
.project h3 { max-width: 30ch; margin: 10px 0 13px; }
.project .kicker { color: var(--gold); }
.project p:not(.kicker) { max-width: 73ch; color: #edf3f7; }
.project p + p { margin-top: 7px; }

.events-source { margin-top: -13px; }
.presentation-list { gap: 0 25px; }
.presentation-list article { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0; }
.presentation-list h4 { font-size: clamp(1.4rem, 2.1vw, 1.85rem); }

.featured-honor {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 56px);
  background: var(--deep);
  color: var(--white);
  padding: clamp(18px, 3vw, 36px);
  border-radius: 18px;
}
.featured-honor .kicker { color: var(--gold); }
.featured-honor img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--sage); border-radius: 8px; }
.featured-honor figcaption { font-size: .83rem; margin-top: 8px; color: #edf3f7; }
.featured-honor h3 { margin: 9px 0 13px; }
.featured-honor p + p { margin-top: 8px; color: #edf3f7; }
.graduation-honors { margin-bottom: 27px; }
.graduation-honors ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: 10px; list-style: none; margin: 0 0 13px; padding: 0; }
.graduation-honors li { background: var(--white); padding: 12px; border-top: 2px solid #c29e5a; border-radius: 0 0 8px 8px; }
.graduation-honors .kicker { color: var(--bronze); }

.bio { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 30px 58px; align-items: start; }
.bio .full-name { margin-top: 13px; color: var(--muted); }
footer { background: var(--wine); color: var(--white); font-size: .87rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 23px; }

@media (max-width: 830px) {
  .wrap { width: calc(100% - 48px); }
  .hero-inner { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
  .hero h1 { color: var(--bronze); font-size: clamp(2.8rem, 6.8vw, 4.15rem); }
  .publications, .events { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 34px); }
  .header-inner { grid-template-columns: 1fr; gap: 9px; }
  .brand { font-size: 1.45rem; }
  .lang { grid-row: 2; grid-column: 1; justify-self: start; }
  nav { grid-row: 3; margin-top: 0; gap: 3px 13px; padding-block: 6px; font-size: .82rem; }
  .hero-inner, .bio, .featured-honor { grid-template-columns: 1fr; }
  .hero h1 { color: var(--bronze); font-size: clamp(2.7rem, 9.5vw, 4.15rem); }
  .portrait { width: min(100% - 9px, 340px); }
  .research, .publications, .events { grid-template-columns: 1fr; }
}

.bio-copy > p + p { margin-top: 12px; }

.upcoming-talk { display: grid; grid-template-columns: minmax(120px, .55fr) minmax(0, 1.45fr); align-items: center; gap: clamp(18px, 4vw, 48px); margin-top: 22px; }
.upcoming-talk img { display: block; width: 100%; height: auto; border-radius: 7px; }
.upcoming-talk .hero-links a { border: 1px solid var(--gold); color: var(--white); }
.upcoming-talk .hero-links a:hover { background: #234561; }
@media (max-width: 620px) {
  .upcoming-talk { grid-template-columns: 1fr; }
  .upcoming-talk figure { max-width: 220px; grid-row: 2; }
}

.congress-acceptance { margin-top: 22px; }
.congress-acceptance h3 { max-width: 42ch; }
.congress-acceptance .hero-links a { border: 1px solid var(--gold); }
.congress-acceptance .hero-links a:hover { background: #234561; }

.congress-acceptance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .57fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
}
.congress-art img { display: block; width: 100%; height: auto; border-radius: 8px; }
.congress-art figcaption { margin-top: 7px; color: #edf3f7; font-size: .8rem; }
@media (max-width: 740px) {
  .congress-acceptance { grid-template-columns: 1fr; }
  .congress-art { max-width: 400px; }
}

.seminario-photo { margin-top: 12px; }
.seminario-photo img { display: block; width: 100%; height: auto; border-radius: 8px; }

.committee-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(20px, 4vw, 46px);
}
.committee-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.95;
  border-radius: 8px;
}
.committee-photo img, .chile-congress-photo img, .media-photos .media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--sage);
}
@media (max-width: 620px) { .committee-feature { grid-template-columns: 1fr; } }

.chile-congress-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.72;
  margin-top: 12px;
  border-radius: 8px;
}

.cv-portrait {
  width: min(100%, 210px);
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid #b78d47;
  border-radius: 12px;
  background: var(--paper);
}
.cv-portrait img { display: block; width: 100%; height: auto; }
@media (max-width: 620px) { .cv-portrait { width: min(100%, 170px); } }

.teaching-intro { max-width: 68ch; color: var(--muted); }
.teaching-gallery h3 { margin: 30px 0 14px; }
.teaching-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.teaching-grid-classroom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.teaching-grid figure { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.teaching-grid a { display: block; }
.teaching-grid a:focus-visible { outline-offset: -4px; }
.teaching-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--sage); }
.teaching-grid-classroom img { aspect-ratio: 16 / 9; }
.teaching-grid figcaption { padding: 8px 12px 10px; color: var(--muted); font-size: .87rem; }
@media (max-width: 720px) { .teaching-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 470px) { .teaching-grid { grid-template-columns: 1fr; } }

.talk-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.events .talk-photos figure, .talk-photos figure { margin: 0; min-width: 0; }
.talk-photos img { display: block; width: 100%; height: auto; border-radius: 8px; }
.events .talk-photos img { aspect-ratio: 4 / 5; object-fit: contain; background: var(--sage); }
.talk-photos figcaption { color: var(--muted); font-size: .79rem; margin-top: 5px; }
.events .talk-photos a { display: block; margin-top: 0; }
.talk-photos-expo figure:first-child { grid-column: 1 / -1; }
.fadat-talk { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 24px; max-width: 850px; }
.fadat-talk p { margin-top: 8px; }
@media (max-width: 430px) { .fadat-talk .talk-photos { grid-template-columns: 1fr; } }

.talk-photos-featured figure:first-child { grid-column: 1 / -1; }

.chapter-volume {
  display: grid;
  grid-template-columns: minmax(110px, 185px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 4vw, 36px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: clamp(16px, 3vw, 28px);
}
.chapter-volume > div:only-child { grid-column: 1 / -1; }
.chapter-volume img { display: block; width: 100%; height: auto; border-radius: 6px; }
.chapter-volume ul { margin: 18px 0; padding-left: 1.2em; }
.chapter-volume li + li { margin-top: 13px; }
.chapter-volume li h4 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.chapter-volume p { color: var(--muted); font-size: .87rem; }
.media-photos { margin-top: 16px; }
.media-photos .media-frame a { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
@media (max-width: 490px) { .chapter-volume { grid-template-columns: 1fr; } .chapter-volume img { max-width: 165px; } }

.events .congress-gallery img { aspect-ratio: 3 / 4; }
.congress-gallery figure > a, .award-gallery figure > a { display: block; }
.congress-video video { display: block; width: 100%; height: auto; background: #102027; border-radius: 8px; }
.award-gallery figure:last-child img { aspect-ratio: 3 / 2; object-fit: contain; background: var(--sage); }
@media (max-width: 430px) {
  .congress-gallery, .award-gallery { grid-template-columns: 1fr; }
}

.events .event-collage img { aspect-ratio: auto; }
.book-gallery figure > a, .unb-record figure > a { display: block; margin-top: 0; }
.book-gallery img { aspect-ratio: 1 / 1; object-fit: contain; background: var(--sage); }
.unb-record { grid-template-columns: minmax(0, 250px); }
.unb-record img { aspect-ratio: 4 / 5; object-fit: contain; background: var(--sage); }

.event-photos-stacked { grid-template-columns: minmax(0, 1fr); }
#cidigin-2025 ul { padding-inline-start: 1.1em; }
#cidigin-2025 li + li { margin-top: 8px; }
.short-course p { margin-bottom: 12px; }
.short-course img { aspect-ratio: auto; }

.launch-photos { margin-top: 16px; }
.launch-photos summary { cursor: pointer; color: var(--ink); font-size: .9rem; font-weight: 700; }

.cpr-gallery figure:last-child { grid-column: 1 / -1; }

.chapter-volume + .chapter-volume { margin-top: 16px; }
.chapter-volume .publication-image { max-width: 450px; }
.publication-image figure > a { display: block; margin-top: 0; }
.media-interview { margin-top: 28px; }
.media-interview .media-photos img { aspect-ratio: 3 / 4; object-position: center; }

.cpr-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 430px) { .cpr-gallery { grid-template-columns: 1fr; } }

.abrasd-gallery figure:nth-child(1), .abrasd-gallery figure:nth-child(4) { grid-column: 1 / -1; }
.abrasd-gallery figure:last-child { grid-column: 1 / -1; max-width: 240px; margin-inline: auto; }

.committee-feature + .committee-feature, #registros-cerimonia { margin-top: 20px; }
.ceremony-photos { grid-template-columns: minmax(0, 260px) minmax(0, 390px); align-items: start; }
@media (max-width: 430px) { .ceremony-photos { grid-template-columns: minmax(0, 1fr); } }

.conference-papers { padding-inline-start: 1.1em; }
.conference-papers li + li { margin-top: 8px; }
#desafios-primeiro-lancamento .book-gallery figure:first-child img { aspect-ratio: auto; }

.launch-photos h4 { margin: 0 0 6px; }
.teaching-grid.gallery-highlight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-more { margin: 14px 0 0; }
.gallery-more summary {
  width: fit-content;
  cursor: pointer;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--sage);
  font-size: .9rem;
  font-weight: 700;
}
.gallery-more summary:hover { border-color: var(--ink); }
.gallery-more .gallery-collapse,
.gallery-more[open] .gallery-expand { display: none; }
.gallery-more[open] .gallery-collapse { display: inline; }
.gallery-more .teaching-grid { margin-top: 14px; }
@media (max-width: 620px) {
  .talk-photos.gallery-highlight, .teaching-grid.gallery-highlight { grid-template-columns: 1fr; }
}


main h2, main .group-title { text-wrap: balance; }
main p:not(.kicker, .credentials, .full-name) {
  text-align: justify;
  hyphens: auto;
}
main figcaption { text-wrap: pretty; }
.bio-copy > p, .teaching-intro { max-width: 68ch; }
.publications h4 + p, .events h4 + p { margin-top: .55em; }
.talk-photos figcaption, .teaching-grid figcaption { font-size: .875rem; line-height: 1.5; }
.publications a, .events a, .gallery-more summary { overflow-wrap: anywhere; }

.honor-certificate { margin-top: 16px; }
.honor-certificate img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }

.year-group { margin-top: 24px; }
.year-heading {
  margin: 0 0 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--bronze);
  font: 700 1rem/1.35 var(--body);
}
.year-group + .group-title { margin-top: 44px; }
.group-title + .year-group { margin-top: 14px; }
.year-group .featured-honor + .events,
.year-group > .events + .graduation-honors,
.year-group .graduation-honors > div { margin-top: 16px; }
.year-group .graduation-honors { margin-bottom: 0; }
.teaching-gallery .year-group > .year-heading { margin-top: 0; }
.teaching-gallery .year-group h4 { margin: 26px 0 14px; }

.about-layout { display: grid; gap: 28px; align-items: start; }
.about-photo { margin: 0; max-width: 300px; }
.about-photo img { display: block; width: 100%; height: auto; border-radius: 6px; }
@media (min-width: 760px) {
  .about-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); }
}
