/* ===========================================================
   Anna's website styles.
   Colors and sizes you might want to tweak are all up here.
   =========================================================== */
:root {
  --accent: #800000;          /* link + banner color (UChicago maroon) */
  --text: #1f1f1f;            /* main text */
  --muted: #6b6b6b;           /* dates, venues, secondary text */
  --rule: #e3e3e3;            /* divider lines */
  --page-width: 50rem;        /* overall column width */
  --portrait-width: 13rem;    /* photo width */
  --portrait-height: 17rem;   /* photo height (taller than wide) */
  --heading-font: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0rem;
  line-height: 1.6;
  color: var(--text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 2rem;
}

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

.muted { color: var(--muted); }

/* ---------- top navigation ---------- */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
  margin-bottom: 2.5rem;
}

.brand {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--accent); }

.nav-links a {
  margin-left: 1.4rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); font-weight: 600; }

/* ---------- about: photo left; name, bio, icons right ---------- */
.about-row {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.about-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

/* on desktop this wrapper is invisible (children act as direct
   flex items); on mobile it becomes the photo+icons unit */
.photo-block { display: contents; }

.portrait {
  width: var(--portrait-width);
  height: var(--portrait-height);
  object-fit: cover;
  border-radius: 3px;
}

/* pull the name's cap height flush with the top edge of the photo */
.about-text h1 { line-height: 1.1; margin-top: -0.3rem; }

h1 {
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.role { color: var(--muted); margin-top: 0.35rem; }
.role a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); }
.role a:hover { color: var(--accent); }

/* ---------- icon links ---------- */
.icon-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.icon-links a { color: var(--muted); display: inline-flex; }
.icon-links a:hover { color: var(--accent); }
.icon-links svg { width: 1.4rem; height: 1.4rem; }

.cv-link {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4rem;   /* matches the svg icon height */
  letter-spacing: 0.02em;
}
.cv-link:hover { text-decoration: none; }

/* email shown as plain text (not a link) to keep scrapers away */
.email-obfuscated {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.email-obfuscated svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ---------- section headings: maroon banner style ---------- */
section { margin-bottom: 2.5rem; }

h2 {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.35rem;
  margin-bottom: 1.1rem;
}

.about-text p + p { margin-top: 0.75rem; }
.interests { color: var(--muted); font-size: 0.95rem; }
.interests strong { color: var(--text); }

/* ---------- news / education / teaching rows ----------
   Grid columns: date | venue | text  (news)
                 date | text          (education, teaching)   */
.news-list, .edu-list, .teaching-list { list-style: none; }

.news-list li {
  display: grid;
  grid-template-columns: 5.5rem 7.5rem 1fr;
  column-gap: 1rem;
  margin-bottom: 0.6rem;
}

.edu-list li, .teaching-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  column-gap: 1rem;
  margin-bottom: 0.6rem;
}

.teaching-list li { margin-bottom: 1rem; }

.date { color: var(--muted); font-size: 0.92rem; padding-top: 0.08rem; }

.venue { font-weight: 600; font-size: 0.92rem; padding-top: 0.08rem; white-space: nowrap; }

/* ---------- publications ---------- */
.pub {
  margin-bottom: 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

/* paper thumbnail on the left; images live in images/pubs/ */
.pub-thumb {
  width: 9rem;
  height: 6rem;
  object-fit: cover;       /* crops to fill the box; use 'contain' to letterbox instead */
  border: 1px solid var(--rule);
  border-radius: 3px;
  flex-shrink: 0;
  background: #fff;
}

.pub-title { font-weight: 600; }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--accent); }

.pub-authors { font-size: 0.95rem; margin-top: 0.1rem; }
.pub-authors .me { font-weight: 600; }

.pub-venue { font-size: 0.95rem; color: var(--muted); font-style: italic; }

.pub-award { font-size: 0.92rem; color: var(--accent); font-weight: 600; }

.pub-links { margin-top: 0.2rem; font-size: 0.9rem; }
.pub-links a {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.05rem 0.5rem;
  margin-right: 0.35rem;
}
.pub-links a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.see-all { margin-top: 1.25rem; font-weight: 600; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- small screens (phones) ----------
   Everything in here ONLY applies when the window is narrower
   than 600px — the desktop layout is untouched.               */
@media (max-width: 600px) {
  .topnav { flex-direction: column; gap: 0.25rem; }
  .nav-links a { margin-left: 0; margin-right: 1.25rem; }

  /* Rearrange the intro: name & title come first, then a smaller
     photo with the bio and interests flowing next to it. */
  .about-row {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    grid-template-areas:
      "name      name"
      "role      role"
      "photo     bio"
      "interests interests"
      "email     email";
    column-gap: 1rem;
    row-gap: 0.6rem;
    align-items: start;
  }
  .about-side, .about-text { display: contents; }
  /* photo + icons live in one grid cell, stacked, so they can
     never be pushed apart no matter how tall the bio gets */
  .photo-block {
    grid-area: photo;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .about-text h1 { grid-area: name; margin-top: 0; }
  .role { grid-area: role; margin-top: 0; }
  .about-text p:not(.role):not(.interests) { grid-area: bio; margin-top: 0; font-size: 0.95rem; }
  .interests { grid-area: interests; margin-top: 0; }
  .portrait { width: 100%; height: 10.5rem; }
  .email-obfuscated { grid-area: email; justify-content: center; }

  .news-list li { grid-template-columns: 1fr; }
  .venue { white-space: normal; }
  .pub { flex-direction: column; gap: 0.5rem; }
  .pub-thumb { width: 100%; height: 8rem; }
}
