/* ============================================================
   César Herrera Garro — shared stylesheet
   Edit colors/fonts here and all three pages update.
   ============================================================ */

:root {
  --navy:        #16324f;   /* headings, name, nav background text */
  --navy-soft:   #274b6d;
  --link:        #1a5fb4;   /* links only — keeps them obviously clickable */
  --link-hover:  #0f4a94;
  --text:        #2b3440;
  --muted:       #6b7785;
  --rule:        #e3e8ee;
  --bg:          #f7f9fb;
  --card:        #ffffff;
  --accent:      #c8952f;   /* small warm accent, used sparingly */
  --measure:     740px;     /* comfortable reading width */
  --wide:        900px;     /* wider container for publication cards */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---------------- Site header + navigation ---------------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  border-top: 4px solid var(--navy);
}

.site-header .bar {
  max-width: var(--wide);
  margin: auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header .brand {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .01em;
}

.site-header .brand:hover { text-decoration: none; color: var(--navy-soft); }

nav.main-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav.main-nav a {
  color: var(--navy-soft);
  font-size: .95rem;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

nav.main-nav a:hover {
  text-decoration: none;
  color: var(--link);
  border-bottom-color: var(--rule);
}

nav.main-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

/* ---------------- Page title band ---------------- */

.page-title {
  max-width: var(--wide);
  margin: auto;
  padding: 2.5rem 2rem 0.5rem;
}

.page-title h1 {
  margin: 0;
  font-size: 2.1rem;
}

.page-title .sub {
  color: var(--muted);
  margin-top: .35rem;
  font-size: 1rem;
}

/* ---------------- Main containers ---------------- */

main {
  max-width: var(--wide);
  margin: auto;
  padding: 1.5rem 2rem 3rem;
}

main.narrow { max-width: var(--measure); }

h2 {
  font-size: 1.35rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--rule);
}

p { margin: .6rem 0; }

/* ---------------- Homepage hero ---------------- */

.hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.5rem 0 .5rem;
}

.hero img {
  width: 200px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(22, 50, 79, .13);
  flex-shrink: 0;
  display: block;
}

.hero-text { flex: 1; min-width: 0; }

.hero-text h1 {
  margin: 0 0 .15rem;
  font-size: 2.2rem;
}

.hero-text .role {
  color: var(--navy-soft);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: .75rem;
}

.hero-text p { margin: .45rem 0; }

.hero-links {
  margin-top: 1rem;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: .4rem .9rem;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--navy-soft);
}

.btn:hover {
  text-decoration: none;
  border-color: var(--link);
  color: var(--link);
}

.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.btn.primary:hover {
  background: var(--navy-soft);
  border-color: var(--navy-soft);
  color: #fff;
}

/* ---------------- Generic cards ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: .9rem;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(22, 50, 79, .09);
  border-color: #cfd9e4;
  transform: translateY(-1px);
}

/* ---------------- Publication entries ---------------- */

.pub-list { list-style: none; padding: 0; margin: 0; }

.pub .authors {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

.pub .authors strong { color: var(--navy); font-weight: 600; }

.pub .title {
  font-size: 1.03rem;
  font-weight: 500;
  line-height: 1.45;
  display: inline-block;
  border-bottom: 1px solid rgba(26, 95, 180, .35);
}

.pub .title:hover { border-bottom-color: var(--link-hover); text-decoration: none; }

.pub .title.nolink {
  color: var(--navy);
  border-bottom: none;
}

.pub .venue {
  font-size: .92rem;
  color: var(--muted);
  font-style: italic;
  margin-top: .35rem;
}

.badges { margin-top: .55rem; display: flex; gap: .4rem; flex-wrap: wrap; }

.badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 999px;
  line-height: 1.5;
}

.badge.journal   { background: #e7f0fb; color: #1a5fb4; }
.badge.preprint  { background: #eef0f3; color: #5c6875; }
.badge.chapter   { background: #f0ecf8; color: #6a4fa3; }
.badge.report    { background: #eaf3ee; color: #3d7a56; }
.badge.year      { background: #f3f6f9; color: var(--muted); }

/* ---------------- Slides entries ---------------- */

.talk .title {
  font-size: 1.03rem;
  font-weight: 500;
  line-height: 1.45;
  display: inline-block;
  border-bottom: 1px solid rgba(26, 95, 180, .35);
}

.talk .title:hover { border-bottom-color: var(--link-hover); text-decoration: none; }

.talk .venue {
  display: block;
  font-size: .92rem;
  color: var(--muted);
  margin-top: .4rem;
}

.pdf-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #b23b3b;
  background: #fceded;
  border-radius: 4px;
  padding: .1rem .38rem;
  margin-right: .5rem;
  vertical-align: 2px;
}

/* ---------------- Misc lists ---------------- */

ul.plain { list-style: none; padding: 0; }
ul.plain li { margin-bottom: .5rem; }

.contact p { margin: .3rem 0; }
.contact strong { color: var(--navy); }

/* ---------------- Footer ---------------- */

footer {
  text-align: center;
  font-size: .88rem;
  color: var(--muted);
  padding: 1.5rem 2rem 2.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 680px) {
  body { font-size: 16px; }

  .site-header .bar { padding: .85rem 1.1rem; }
  nav.main-nav { gap: 1rem; }

  .page-title { padding: 1.75rem 1.1rem .25rem; }
  .page-title h1 { font-size: 1.7rem; }

  main { padding: 1rem 1.1rem 2rem; }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding-top: 1.75rem;
  }

  .hero img { width: 160px; max-width: 60%; }
  .hero-text h1 { font-size: 1.8rem; }
  .hero-links { justify-content: center; }

  h2 { font-size: 1.2rem; margin-top: 2rem; }
  .card { padding: .95rem 1rem; }
}
