/* Layout and typography follow Jon Barron's website (https://jonbarron.info) */

/**************/
/* BASE RULES */
/**************/
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

h1 {
  font-size: 32px;
  font-weight: normal;
  text-align: center;
  margin: 14px 0;
}

h2 {
  font-size: 22px;
  font-weight: normal;
  margin: 0;
}

h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  display: inline;
}

p {
  margin: 14px 0;
}

.page {
  max-width: 800px;
  margin: 0 auto;
}

/* last-edited stamp, top right */
.last-edited {
  padding: 10px 2.5% 0;
  text-align: right;
  font-size: 12px;
  color: #777;
}

/**********/
/* HEADER */
/**********/
.intro {
  display: flex;
  align-items: center;
  padding: 2.5%;
}

.intro-text {
  width: 60%;
  padding-right: 2.5%;
}

.intro-photo {
  width: 40%;
  padding-left: 2.5%;
}

.intro-photo img {
  display: block;
  width: 100%;
  border-radius: 50%;
}

.intro-text p:first-of-type {
  margin-top: 0;
}

.links {
  text-align: center;
}

/************/
/* SECTIONS */
/************/
.section-head {
  padding: 2.5% 2.5% 4px;
}

.section-head p {
  margin: 8px 0 0;
}

.section + .section {
  margin-top: 36px;
}

/* news list */
.news {
  list-style: none;
  margin: 0;
  padding: 4px 2.5% 0;
}

.news li {
  display: flex;
  margin-bottom: 8px;
}

.news .date {
  flex: none;
  width: 95px;
  font-weight: 700;
}

/* one entry: thumbnail on the left, text on the right */
.row {
  display: flex;
  align-items: flex-start;
  padding: 14px 2.5%;
}

.row-thumb {
  width: 25%;
  min-width: 120px;
  padding-right: 2.5%;
  flex: none;
}

.row-text {
  flex: 1;
  min-width: 0;
}

.row-text > .meta {
  display: block;
  margin-top: 2px;
}

.row-text > .summary {
  margin: 8px 0 0;
}

.row-links {
  margin-top: 2px;
}

.row-text ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.row-text li {
  margin-bottom: 2px;
}

.group {
  margin-top: 10px;
}

.group > ul {
  margin-top: 2px;
}

.row-text > .tools {
  margin: 8px 0 0;
}

.coursework {
  columns: 2;
  column-gap: 24px;
}

.coursework li {
  break-inside: avoid;
}

/**************/
/* THUMBNAILS */
/**************/
.thumb {
  position: relative;
  line-height: 0;
}

.thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* still frame by default, animation fades in on hover */
.thumb .anim {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  opacity: 0;
  transition: opacity .2s ease-in-out;
}

.thumb:hover .anim {
  opacity: 1;
}

/* text tile for entries that have no image (swap for a logo any time) */
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 8px;
  border: 1px solid #e2e4e8;
  border-radius: 4px;
  background: #f4f5f7;
  color: #555;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.tile small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 14px;
  border: 1px solid #e2e4e8;
  border-radius: 4px;
  background: #fff;
}

.logo-box img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
}

/**********/
/* FOOTER */
/**********/
.footer {
  padding: 24px 0 28px;
  text-align: center;
  font-size: small;
}

.footer a {
  font-size: small;
}

/**********/
/* MOBILE */
/**********/
@media (max-width: 600px) {
  .intro {
    flex-direction: column-reverse;
  }

  .intro-text,
  .intro-photo {
    width: 100%;
    padding: 0;
  }

  .intro-photo {
    width: 60%;
    margin-bottom: 8px;
  }

  .news .date {
    width: 80px;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .row-thumb {
    width: 55%;
    max-width: 220px;
    padding: 0 0 10px;
  }

  .tile {
    aspect-ratio: 16 / 6;
  }

  .coursework {
    columns: 1;
  }
}
