/* Lorena Moreno — personal academic site */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,300;1,9..144,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --paper: #FAFAF8;
  --ink: #23272B;
  --muted: #6B7076;
  --accent: #0E6E5C;
  --accent-soft: #E3EFEB;
  --rule: #DCDCD6;
  --measure: 64ch;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
a:hover { text-decoration-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Layout */

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.005em;
}
.brand:hover { color: var(--accent); }

.nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 0.2rem;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

main { padding: 3.5rem 0 4rem; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* Type */

h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  margin: 2rem 0 0.75rem;
}
p { margin: 0 0 1.1rem; max-width: var(--measure); }

.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 34ch;
  margin: 0 0 2.5rem;
}

/* Home */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}
.hero-text { min-width: 0; }
.portrait {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule);
  margin-top: 0.6rem;
}
.role {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 2rem;
}

.interests {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.interests dl { margin: 0; display: grid; grid-template-columns: 6.5rem 1fr; row-gap: 0.6rem; column-gap: 1rem; }
.interests dt { color: var(--muted); }
.interests dd { margin: 0; }

/* Research */

.pubs { list-style: none; margin: 0 0 3rem; padding: 0; max-width: 72ch; }
.pubs li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.pubs li:last-child { border-bottom: 1px solid var(--rule); }
.pubs .year {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.1rem;
}
.pubs .entry { min-width: 0; }
.pubs .title { font-weight: 500; }
.pubs .title a { color: var(--ink); }
.pubs .title a:hover { color: var(--accent); }
.pubs .meta { color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }

.ongoing { list-style: none; margin: 0; padding: 0; max-width: 72ch; }
.ongoing li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.ongoing li:last-child { border-bottom: 1px solid var(--rule); }
.ongoing .title { font-weight: 500; margin-bottom: 0.25rem; }
.ongoing .title a { color: var(--ink); }
.ongoing .title a:hover { color: var(--accent); }
.ongoing p { margin: 0; color: var(--ink); font-size: 0.97rem; }
.ongoing .note { color: var(--muted); font-size: 0.92rem; margin-top: 0.3rem; }

/* CV */

.cv-actions { margin: 0 0 1.75rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
}
.button:hover { background: #0B5A4B; }
.cv-frame {
  width: 100%;
  height: 80vh;
  min-height: 600px;
  border: 1px solid var(--rule);
  background: #fff;
}

/* Contact */

.contact-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.contact-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-list .label { color: var(--muted); }

/* Responsive */

@media (max-width: 720px) {
  html { font-size: 16px; }
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait { width: 140px; height: 140px; order: -1; }
  .interests dl { grid-template-columns: 1fr; row-gap: 0.25rem; }
  .interests dt { margin-top: 0.6rem; }
  .pubs li { grid-template-columns: 1fr; gap: 0.2rem; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.15rem; }
  main { padding: 2.5rem 0 3rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a, .nav a, .button { transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; }
}
