/* Jacob Lefler -- personal site.
   One page, one stylesheet, no framework. Edit index.html for content. */

:root {
  --bg:     #fdfdfc;
  --text:   #1c1c1a;
  --muted:  #6d6d68;
  --accent: #1a4d80;
  --rule:   #e2e1dd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #16161a;
    --text:   #e6e5e1;
    --muted:  #9a9a94;
    --accent: #8ab4e8;
    --rule:   #33333a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 4rem 1.5rem 5rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 40rem;
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: currentColor;
}

/* --- header ------------------------------------------------------------- */

.intro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
}

h1 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

.title {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* --- sections ----------------------------------------------------------- */

section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

p { margin: 0 0 1rem; }

ul.plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.plain li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
}

.paper { font-weight: 600; }

/* Paper titles are full-width lines, not two-column rows like the teaching list. */
ul.research li {
  display: block;
  padding: 0.45rem 0;
}

.year {
  color: var(--muted);
  font-size: 0.9375rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.aside {
  color: var(--muted);
  font-size: 0.9375rem;
}

section .aside:last-child { margin-bottom: 0; }
section .aside + ul.plain { margin-top: -0.4rem; }
section ul.plain + .aside { margin-top: 1rem; }

/* --- footer ------------------------------------------------------------- */

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
}

.sep {
  margin: 0 0.5rem;
  color: var(--muted);
  opacity: 0.6;
}

/* --- narrow screens ----------------------------------------------------- */

@media (max-width: 30rem) {
  body { padding: 2.5rem 1.25rem 3.5rem; }

  .intro { gap: 1.15rem; }

  h1 { font-size: 1.6rem; }

  /* stack the year under the entry instead of squeezing it */
  ul.plain li {
    flex-direction: column;
    gap: 0.1rem;
  }

  footer { line-height: 2; }
}
