/* Styling after ljvmiranda921.github.io: cream paper, a Vollkorn serif
   reading column, Vollkorn SC small-caps headings and dark red links.
   Fonts are loaded from Google Fonts in each page's <head>; the stack falls
   back to Georgia offline. */

:root {
  --bg:      #fffff8;
  --text:    #111111;
  --heading: #111111;
  --muted:   #828282;
  --link:    #a00000;
  --visited: #540000;
  --hover:   #111111;
  --rule:    #e8e8e8;
  --mark:    #f4efc8;
}

html { background: var(--bg); }

body {
  margin: 0;
  padding: 0 0 40px;
  background: var(--bg);
  color: var(--text);
  font-feature-settings: 'kern' 1, 'lnum' 1;
  font-variant-numeric: lining-nums;
  font-kerning: normal;
  font-synthesis: none;
}

a { color: var(--link); text-decoration: none; }
a:visited { color: var(--visited); }
a:focus, a:hover { color: var(--hover); text-decoration: underline; }

body, td, th, tr, p, a, li {
  font-family: 'Vollkorn', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.5;
}

td, th, tr, p { color: var(--text); }

p { text-wrap: pretty; overflow-wrap: break-word; }

strong {
  font-family: 'Vollkorn', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
}

em { color: var(--text); font-style: italic; }

h2 {
  margin: 0;
  font-family: 'Vollkorn SC', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--heading);
}

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px;
  color: var(--heading);
}

.date { color: var(--muted); font-size: 15.75px; }

.papertitle {
  font-family: 'Vollkorn', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: 'Vollkorn', Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--heading);
}

span.highlight { background-color: var(--mark); }

/* Employer / university logos. Square marks and wide wordmarks are
   normalised into the same optical box so the column reads evenly. */
.logo {
  width: auto;
  height: 62px;
  max-width: 100%;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 10px;
}

/* Wordmarks are much wider than the square marks, so cap them on both
   axes: wide ones land on max-width, tall ones on max-height. */
.logo-wide {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62px;
  border-radius: 0;
}

/* Stack the intro and row layouts on narrow screens */
@media (max-width: 640px) {
  table td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }

  .name { font-size: 28px; }

  /* !important: these images carry an inline max-width:100% that would win. */
  td[style*="width:20%"] img { max-width: 160px !important; display: block; margin: 0 auto; }
  td[style*="width:37%"] img { max-width: 200px !important; display: block; margin: 0 auto; }
}

/* ===== Recent posts and "What's new?" =====
   Two columns under a plain rule, after ljvmiranda921.github.io. */

hr.section-rule {
  margin: 32px 0 26px;
  border: 0;
  border-top: 1px solid var(--heading);
}

.links {
  margin: 4px 0 0;
  text-align: center;
  text-wrap: balance;
}

.links a { white-space: nowrap; }

.home-sections { display: block; }

/* Stacked on narrow screens, the second column needs separating. */
.home-sections .column + .column { margin-top: 26px; }

.home-heading {
  font-family: 'Vollkorn SC', Georgia, serif;
  font-size: 23.4px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--heading);
  margin: 0 0 12px;
}

.home-heading a, .home-heading a:visited { color: var(--heading); }
.home-heading a:hover { color: var(--link); text-decoration: none; }

.home-post-list { list-style: none; margin: 0; padding: 0; }
.home-post-list > li { margin-bottom: 22px; }

.home-post-list .entry-date {
  display: block;
  font-size: 16.2px;
  color: var(--muted);
  margin-bottom: 2px;
}

.home-post-list h3 {
  margin: 0 0 4px;
  font-family: 'Vollkorn', Georgia, serif;
  font-size: 21.6px;
  font-weight: 400;
  line-height: 1.25;
}

.home-post-list h3 a { color: var(--link); }
.home-post-list h3 a:hover { color: var(--hover); }
.home-post-list p { margin: 0; font-size: 16.2px; }

.news-item { margin-bottom: .7em; }
.news-item p { margin: 0; font-size: 16.2px; line-height: 1.5; }
.news-item .date { color: var(--heading); font-size: 16.2px; }

.home-empty { color: var(--muted); font-size: 16.2px; list-style: none; }

@media screen and (min-width: 769px) {
  .home-sections { display: flex; gap: 30px; width: 100%; }
  .home-sections .column { flex: 1 1 0; min-width: 0; }
  .home-sections .column + .column { margin-top: 0; }
}
