/* AcademicPages / Minimal Mistakes-inspired layout, UMD red accent */
:root {
  --bg: #ffffff;
  --text: #3b3e42;
  --muted: #898c8f;
  --heading: #2c2f33;
  --accent: #e21833;        /* UMD red */
  --accent-deep: #b0122a;
  --border: #ebeced;
  --border-strong: #dcdee0;
  --masthead-h: 52px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", "Lato", Arial, sans-serif;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { color: var(--heading); font-weight: 700; line-height: 1.25; }
sub { font-size: 0.72em; }

/* ---------- MASTHEAD ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.masthead__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 22px;
  height: var(--masthead-h); display: flex; align-items: center; justify-content: space-between;
}
.site-title { display: inline-flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; }
.site-logo { width: 26px; height: 26px; display: block; }
.site-title:hover { color: var(--accent); text-decoration: none; }
.masthead__nav { display: flex; align-items: center; gap: 22px; }
.masthead__nav a { color: #6f777d; font-size: 0.92rem; font-weight: 600; }
.masthead__nav a:hover { color: var(--accent); text-decoration: none; }
.masthead__toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--heading); }

/* ---------- PAGE LAYOUT ---------- */
.page-wrap {
  max-width: var(--maxw); margin: 0 auto; padding: 36px 22px 0;
  display: grid; grid-template-columns: 210px 1fr; gap: 44px; align-items: start;
}

/* ---------- AUTHOR SIDEBAR ---------- */
.author { position: sticky; top: calc(var(--masthead-h) + 24px); }
.author__avatar { width: 100%; max-width: 210px; margin: 0 0 16px; }
.author__avatar img {
  width: 100%; height: auto; display: block; object-fit: cover; border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  background: #e9e7e2;
}
.author__name { font-size: 1.3rem; margin: 0 0 8px; text-align: left; }
.author__bio { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin: 0 0 16px; }
.author__links { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.author__links li { border-bottom: 1px solid var(--border); }
.author__links a, .author__loc {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  font-size: 0.9rem; color: #5b5f63; font-weight: 600;
}
.author__links a:hover { color: var(--accent); text-decoration: none; }
.author__loc { color: var(--muted); font-weight: 500; }
.ico { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; opacity: 0.85; }

/* ---------- MAIN CONTENT ---------- */
.page-content { min-width: 0; padding-bottom: 10px; }
.page-content section { margin-bottom: 18px; }
.page-content h1 { font-size: 1.9rem; margin: 0 0 16px; }
.page-content h2 {
  font-size: 1.5rem; margin: 34px 0 14px; padding-bottom: 7px;
  border-bottom: 1px solid var(--border-strong);
}
.page-content section:first-child h1 { margin-top: 4px; }
.page-content p { margin: 0 0 14px; }
.page-content p strong { color: var(--heading); }
.research-interests {
  font-size: 0.94rem; color: var(--text);
  background: #faf7f7; border-left: 3px solid var(--accent);
  padding: 12px 16px; border-radius: 0 6px 6px 0;
}
.note { font-size: 0.88rem; color: var(--muted); margin-top: -2px; }

/* ---------- EDUCATION ---------- */
.edu { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.edu:last-child { border-bottom: none; }
.edu__logo { flex: 0 0 auto; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; }
.edu__logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.edu__body { min-width: 0; }
.edu__school { font-size: 1.04rem; font-weight: 700; color: var(--heading); margin: 0 0 2px; }
.edu__degree { font-size: 0.94rem; color: var(--text); margin: 0 0 2px; }
.edu__meta { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ---------- PUBLICATIONS ---------- */
.pub-head {
  font-size: 1.06rem; color: var(--accent-deep); margin: 22px 0 10px;
  font-weight: 700;
}
.pubs { margin: 0 0 6px; padding-left: 1.5em; }
.pubs li { margin-bottom: 12px; font-size: 0.94rem; line-height: 1.55; color: var(--text); }
.pubs li::marker { color: var(--muted); }
.pubs em { color: var(--heading); font-style: italic; font-weight: 600; }
.pubs strong { color: #000; }
.pubs a { font-weight: 600; white-space: nowrap; }
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--accent); background: rgba(226,24,51,0.08);
  border: 1px solid rgba(226,24,51,0.2); border-radius: 4px; padding: 0 6px; margin-left: 2px;
}

/* ---------- RESEARCH / EXPERIENCE ITEMS ---------- */
.ritem { margin-bottom: 16px; }
.ritem h4 { font-size: 1.02rem; margin: 0 0 5px; color: var(--heading); }
.ritem h4 .when, .ritem h4 .where { font-weight: 500; color: var(--muted); font-size: 0.86rem; float: right; }
.ritem p { font-size: 0.94rem; color: var(--text); margin: 0; }

.fig { margin: 0 0 22px; }
.fig img {
  width: 100%; max-width: 360px; border-radius: 8px; display: block;
  border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.fig figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }

/* ---------- PLAIN LISTS (talks, awards) ---------- */
.plain { list-style: none; padding: 0; margin: 0 0 8px; }
.plain li {
  display: flex; gap: 14px; font-size: 0.94rem; padding: 7px 0;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.plain li:last-child { border-bottom: none; }
.yr { flex: 0 0 46px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

.skills-line { font-size: 0.94rem; color: var(--text); }

/* ---------- FOOTER ---------- */
.page-footer {
  margin-top: 30px; padding: 18px 0 26px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--muted);
}
.page-footer p { margin: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .page-wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .author {
    position: static; display: grid; grid-template-columns: 150px 1fr; gap: 20px;
    align-items: start; padding-bottom: 22px; border-bottom: 1px solid var(--border);
  }
  .author__avatar { width: 150px; margin: 0; grid-row: span 3; }
  .author__avatar img { width: 150px; height: auto; }
  .author__name { margin-top: 0; }
  .author__links { grid-column: 2; }
}
@media (max-width: 600px) {
  .masthead__nav {
    display: none; position: absolute; top: var(--masthead-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--border);
    padding: 6px 22px 14px;
  }
  .masthead__nav.open { display: flex; }
  .masthead__nav a { padding: 9px 0; }
  .masthead__toggle { display: block; }
  .author { grid-template-columns: 1fr; }
  .author__avatar { margin: 0 auto; }
  .author__name, .author__bio { text-align: center; }
  .author__links { grid-column: 1; }
  .ritem h4 .when, .ritem h4 .where { float: none; display: block; }
}
