:root {
  --text: #222;
  --muted: #666;
  --link: #34568a;
  --line: #dddddd;
  --background: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

p {
  margin: 0 0 12px;
}

.site {
  max-width: 850px;
  margin: 0 auto;
  padding: 48px 28px 72px;
}

/* Links */

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Homepage header and profile */

.site-header {
  margin-bottom: 13px;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 600;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 36px;
  align-items: start;
}

.profile-text {
  max-width: 620px;
}

.profile-text p:last-child {
  margin-bottom: 0;
}

.profile-links {
  margin: 0 0 22px;
}

.headshot {
  display: block;
  width: 180px;
  height: auto;
  margin: 0;
}

/* Section headings */

h2 {
  margin: 24px 0 18px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: 1.45rem;
  font-weight: 600;
}

h3 {
  margin: 0 0 5px;
  font-size: 1.08rem;
  line-height: 1.4;
}

/* General text */

.small {
  color: var(--muted);
  font-size: 0.94rem;
}

/* Research and course entries */

.paper {
  margin-bottom: 30px;
}

.paper-meta {
  margin-bottom: 7px;
  color: var(--muted);
}

.paper-meta a {
  color: var(--link);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
  font-size: 0.88rem;
}

.paper-links a {
  color: #52627a;
  text-decoration: underline;
  text-decoration-color: #aeb5bf;
  text-underline-offset: 3px;
}

.paper-links a:hover,
.paper-links a:focus {
  color: var(--link);
  text-decoration-color: currentColor;
}

/* Teaching, advising, and recommendation pages */

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 600;
}

/* Lists */

ul,
ol {
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

/* Small screens */

@media (max-width: 650px) {
  .site {
    padding: 30px 20px 50px;
  }

  .site-header h1,
  .page-header h1 {
    font-size: 1.9rem;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .profile-text {
    max-width: none;
  }

  .headshot {
    width: 155px;
  }
}
