/* ==========================================================================
   Andrea Neyra Nazarrett — academic site
   Classic, restrained, single column · Libre Baskerville + Open Sans
   White background · understated navy links  (inspired by vincentpons.org)
   ========================================================================== */

:root {
  --ink:   #2c2c2c;
  --head:  #111111;
  --soft:  #6b6b6b;
  --link:  #1c4a7e;
  --link-h: #102f54;
  --rule:  #e4e4e4;
  --wrap:  880px;
}

* { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.8rem; }

/* ---- Top bar ---- */
.topbar { border-bottom: 1px solid var(--rule); }
.topbar .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.brand {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.3rem;
  color: var(--head);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.menu { display: flex; gap: 1.6rem; }
.menu a {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
  text-decoration: none;
}
.menu a:hover { color: var(--head); }
.menu a.current { color: var(--head); }

/* ---- Headings ---- */
h1, h2, h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  color: var(--head);
  font-weight: 400;
  line-height: 1.25;
}
.hero-name { font-size: 2.6rem; letter-spacing: -0.005em; margin: 2.6rem 0 0.5rem; }
.hero-sub {
  font-family: "Open Sans", sans-serif;
  font-size: 1.02rem;
  color: var(--soft);
  margin: 0 0 2rem;
  line-height: 1.5;
}
.page-title { font-size: 2.1rem; margin: 2.4rem 0 1.6rem; }
.content h2 { font-size: 1.4rem; margin: 2.6rem 0 0.7rem; }
.content h3 { font-size: 1.16rem; font-weight: 700; margin: 1.9rem 0 0.25rem; }

/* ---- Body ---- */
main { padding-bottom: 2rem; }
p { margin: 0 0 1.25rem; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-h); text-decoration: underline; text-underline-offset: 2px; }

.content small, .meta { font-size: 0.85rem; color: var(--soft); line-height: 1.5; display: block; }
.meta a { color: var(--soft); }
.meta a:hover { color: var(--link); }
ul { padding-left: 1.15rem; margin: 0.5rem 0 1.25rem; }
li { margin-bottom: 0.5rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.6rem 0; }
::selection { background: rgba(28, 74, 126, 0.14); }

/* ---- Home photo ---- */
.home-photo {
  float: right;
  width: 215px;
  margin: 0.4rem 0 1rem 2rem;
}

/* ---- Working-paper list on home ---- */
.wplist { list-style: none; padding: 0; margin: 0.4rem 0 1.25rem; }
.wplist li { margin-bottom: 1rem; }
.wplist .t { font-weight: 600; }
.wplist .m { font-size: 0.85rem; color: var(--soft); }

/* ---- CV ---- */
.btn {
  display: inline-block;
  border: 1px solid var(--link);
  border-radius: 4px;
  padding: 0.42rem 1rem;
  font-size: 0.9rem;
  color: var(--link);
}
.btn:hover { background: var(--link); color: #fff; text-decoration: none; }
.cv-sub { font-weight: 700; font-size: 0.95rem; color: var(--head); margin: 1.4rem 0 0.3rem; }

/* ---- Mexico City: gallery + guide ---- */
.tip {
  font-style: italic;
  color: var(--soft);
  border-left: 3px solid #d9d9d9;
  padding-left: 1rem;
  margin: 0 0 1.8rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 1.6rem 0 2.6rem;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}
.gallery figcaption {
  font-size: 0.76rem;
  color: var(--soft);
  text-align: center;
  margin-top: 0.3rem;
}
.sublabel { font-weight: 700; font-size: 0.95rem; color: var(--head); margin: 1.1rem 0 0.2rem; }
.guide ul { margin-top: 0.2rem; }
.guide li b, .guide li strong { color: var(--head); }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 7px; } }

/* ---- Footer ---- */
.foot {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
}
.foot .wrap { padding: 1.3rem 1.8rem; font-size: 0.8rem; color: #9a9a9a; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .topbar .wrap { padding-top: 1.1rem; padding-bottom: 1.1rem; }
  .menu { gap: 1.1rem; }
  .hero-name { font-size: 2.1rem; margin-top: 1.8rem; }
  .home-photo { float: none; display: block; width: 160px; margin: 0 0 1.2rem; }
}

/* --- Paper entries with thumbnails (Sep 2026) --- */
.wplist li { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1.6rem; }
.wplist .thumb {
  flex: 0 0 110px; width: 110px; border: 1px solid #ddd; border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); background: #fff;
}
.wplist .entry { flex: 1; min-width: 0; }
.wplist .t { font-weight: 700; font-size: 1.18rem; line-height: 1.35; }
.wplist .abs { font-size: 0.9rem; color: #444; margin: 0.45rem 0 0; line-height: 1.55; }
.jmp-flag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #2171B5; color: #fff; border-radius: 4px; padding: 2px 8px; margin-bottom: 4px; }
@media (max-width: 560px) {
  .wplist li { flex-direction: column; }
  .wplist .thumb { width: 140px; }
}

/* ---- Teaching page (Sep 2026) ---- */
.tstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1.8rem 0 0.6rem; }
.tstat { border: 1px solid var(--rule); border-radius: 6px; padding: 0.9rem 1rem 0.8rem; text-align: center; }
.tstat .n { font-family: "Libre Baskerville", Georgia, serif; font-size: 1.7rem; color: var(--link); line-height: 1.1; }
.tstat .l { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--soft); margin-top: 0.3rem; line-height: 1.4; }
.tcards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1rem 0 1.4rem; }
.tcard { border: 1px solid var(--rule); border-left: 3px solid var(--link); border-radius: 0 6px 6px 0; padding: 0.9rem 1.1rem 0.8rem; }
.tcard h3 { margin: 0 0 0.25rem; font-size: 1.02rem; font-family: "Open Sans", sans-serif; font-weight: 700; }
.tcard p { font-size: 0.87rem; color: #444; line-height: 1.55; margin: 0 0 0.55rem; }
.aud { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--link); background: rgba(28, 74, 126, 0.08); border-radius: 3px; padding: 1px 7px; margin-right: 4px; }
.texp { margin: 0.4rem 0 1.6rem; }
.texp .lead { font-size: 0.95rem; color: #3a3a3a; margin-bottom: 0.6rem; }
.tref { border-top: 1px solid var(--rule); margin-top: 2.4rem; padding-top: 1.1rem; font-size: 0.92rem; color: #3a3a3a; }
@media (max-width: 600px) {
  .tstats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tstat { padding: 0.6rem 0.4rem; }
  .tstat .n { font-size: 1.3rem; }
  .tcards { grid-template-columns: 1fr; }
}
