/* ------------------------------------------------------------------------ *
 * Persona website template -- modern vanilla CSS.
 *
 * Layout: a sticky-ish hero header at the top, then a centered single column
 * of card-style sections (Bio, Teaching, Publications, Service). The accent
 * palette is loosely modeled after the indigo/deep-purple Material theme the
 * previous site used.
 * ------------------------------------------------------------------------ */

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --fg: #424242;
  --fg-strong: #1f1f1f;
  --muted: #6b7280;
  --primary: #3949ab;          /* indigo 600 */
  --primary-strong: #283593;   /* indigo 800 */
  --on-primary: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius: 6px;
  --max-w: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* ----- Header ----------------------------------------------------------- */

.site-header {
  background: var(--primary);
  color: var(--on-primary);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "photo identity contact"
    "nav   nav      nav";
  column-gap: 1.5rem;
  row-gap: 1rem;
  align-items: center;
}

.site-header .photo {
  grid-area: photo;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.site-header .identity { grid-area: identity; }
.site-header .name {
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.site-header .role {
  font-size: 1.1rem;
  opacity: 0.92;
}

.site-header .contact {
  grid-area: contact;
  font-style: normal;
  font-size: 0.95rem;
  text-align: right;
  line-height: 1.5;
}
.site-header .contact .label { font-style: italic; opacity: 0.85; }
.site-header .contact a { color: var(--on-primary); text-decoration: underline; }

.site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.site-nav a {
  color: var(--on-primary);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 120ms ease;
  text-decoration: none;
}
.site-nav a:hover { border-bottom-color: var(--on-primary); text-decoration: none; }

/* ----- Content cards ---------------------------------------------------- */

.content {
  max-width: var(--max-w);
  margin: -1rem auto 2rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-title {
  margin: 0;
  padding: 1rem 1.5rem 0.5rem;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 500;
}

.card-body {
  padding: 0.5rem 1.5rem 1.25rem;
}

.card-body p { margin: 0 0 0.85rem; }
.card-body p:last-child { margin-bottom: 0; }

/* ----- Bio -------------------------------------------------------------- */

.profile-links {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.profile-links li a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--fg-strong);
}
.profile-links li a:hover { color: var(--primary); }
.profile-links img { vertical-align: middle; border-radius: 3px; }

.callout {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: lightgoldenrodyellow;
  border-radius: 12px;
  color: #2c2c2c;
  font-size: 1rem;
}
.callout p { margin: 0 0 0.5rem; }
.callout p:last-child { margin-bottom: 0; }

/* ----- Publications ----------------------------------------------------- */

/* `<ol reversed>` provides descending numeric markers natively; we just style
   the surrounding spacing. */
ol.pubs {
  padding-left: 2.5rem;
  margin: 0;
}

ol.pubs li {
  margin: 0 0 1.1rem;
  padding-left: 0.25rem;
}
ol.pubs li::marker {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pub-title { font-weight: 600; color: var(--fg-strong); }
.pub-authors { font-size: 0.97rem; }
.pub-authors strong { color: var(--fg-strong); }
.pub-venue { color: var(--muted); font-size: 0.92rem; }
.pub-note { font-size: 0.92rem; margin-top: 0.15rem; }
.pub-note strong { color: var(--primary-strong); }

/* ----- Service ---------------------------------------------------------- */

#service p { margin: 0 0 0.6rem; }

#service .events {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
#service .events li {
  margin: 0 0 0.35rem;
  padding: 0;
}
#service .event-time {
  display: inline-block;
  min-width: 7ch;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right: 0.4rem;
}

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

.site-footer {
  max-width: var(--max-w);
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

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

@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "identity"
      "contact"
      "nav";
    text-align: center;
    padding: 1.5rem 1rem 1rem;
    row-gap: 0.75rem;
  }

  .site-header .photo {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }

  .site-header .contact {
    text-align: center;
  }

  .site-nav { justify-content: space-around; gap: 1rem; }

  .card-title, .card-body { padding-left: 1rem; padding-right: 1rem; }

  ol.pubs { padding-left: 2rem; }
}

/* ----- Print ------------------------------------------------------------ */

@media print {
  body { background: #fff; color: #000; }
  .site-header { background: #fff; color: #000; }
  .site-header .contact a, .site-nav a { color: #000; }
  .site-nav { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .card-title { color: #000; }
  .callout { background: #fff; border: 1px solid #ccc; }
  a { color: inherit; text-decoration: none; }
}
