/* ------------------------------------------------------------
   Colors and fonts. Change the values here to restyle the site.
   ------------------------------------------------------------ */
:root {
  --bg: #ffffff;
  --ink: #1f2328;
  --muted: #5f6670;
  --rule: #e6e6e6;
  --accent: #2f5d50;        /* deep green */
  --accent-soft: #e9f0ec;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #1d4237; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* Header ----------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 26px 24px 18px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font: 600 22px var(--serif); letter-spacing: -0.01em; }
.brand-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.site-header nav { display: flex; gap: 26px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding-bottom: 4px; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.page { padding-top: 44px; padding-bottom: 56px; min-height: 60vh; }

/* Home ------------------------------------------------------- */
.intro { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }

.photo-frame {
  position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden;
  background: var(--accent-soft); display: grid; place-items: center;
}
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.initials { font: 500 52px var(--serif); color: var(--accent); }

.profile-name { font: 500 24px/1.2 var(--serif); margin: 18px 0 8px; }
.profile-alt { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.profile-position { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.4; }
.profile-affil { margin: 2px 0 0; font-size: 15px; color: var(--muted); line-height: 1.45; }
.profile-links { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.profile-links li { margin-bottom: 3px; }
.profile-links a { text-decoration: none; }
.profile-links a:hover { text-decoration: underline; }

.prose p { margin: 0 0 1.05em; }
.prose h2 {
  display: flex; align-items: center; gap: 14px;
  font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin: 40px 0 16px;
}
.prose h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 4px 0 20px; padding-left: 20px; }
.prose li { margin-bottom: 2px; }

/* Inner pages ------------------------------------------------ */
.section { margin-bottom: 40px; }
.section-title {
  display: flex; align-items: center; gap: 14px;
  font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin: 0 0 20px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* Papers */
.paper { margin-bottom: 52px; }
/* Research list: the paper column keeps its width (--paper-col); only the summary column is wider. */
.research-list { --paper-col: 682px; --summary-col: 300px; }
.research-list .paper { max-width: var(--paper-col); }
.research-list .paper.has-summary {
  display: grid; grid-template-columns: var(--paper-col) var(--summary-col); gap: 40px; align-items: start;
  max-width: none;
}
@media (min-width: 1100px) {
  .research-list { margin-right: -70px; }   /* summary column extends a little past the header edge */
}
@media (max-width: 1099px) {
  .research-list .paper.has-summary { grid-template-columns: minmax(0, 1fr) 230px; }
  .research-list .paper { max-width: none; }
}
.paper-summary {
  margin: 3px 0 0 !important; font-size: 13.5px; line-height: 1.5; color: var(--muted);
  padding-left: 14px; border-left: 2px solid var(--rule);
}
.paper p { margin: 0; }
.paper-head { line-height: 1.5; }
.paper-title { font: 400 18.5px/1.4 var(--serif); }
.paper-head em { font-weight: 700; }   /* journal names (written as *Journal* in papers.yml) */
.paper-title a { color: var(--ink); }
.paper-links { margin-top: 3px !important; }
.paper-note { font-size: 15.5px; color: var(--muted); }


/* Footer ----------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 24px 34px; }

/* Phones ----------------------------------------------------- */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 20px; }
  .site-header nav { gap: 20px; }
  .page { padding-top: 28px; }
  .intro { grid-template-columns: 1fr; gap: 28px; }
  .profile { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto auto 1fr; column-gap: 18px; align-items: start; }
  .profile .photo-frame { grid-row: 1 / span 3; }
  .initials { font-size: 34px; }
  .profile-name { margin-top: 0; }
  .research-list .paper.has-summary { grid-template-columns: 1fr; gap: 6px; }
}
