body {
  margin: 0;
  background: #efefef;
  color: #111;
  font-size: 14px;
  line-height: 1.25;
}

.page {
  width: min(100%, 980px);
  margin: 10px auto;
  background: #fff;
  border: 1px solid #aaa;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  border-right: 1px solid #bbb;
  padding: 10px 10px 8px;
  position: sticky;
  top: 10px;
  align-self: start;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

.name {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  display: inline-flex;
  align-items: baseline;
  column-gap: 0.08ch;
}

.name-first {
  position: relative;
  display: inline-block;
  width: 2.75em;
  animation: firstNameWidth 5.2s ease-in-out infinite;
}

.name-first::before {
  content: "Teddy";
  visibility: hidden;
}

.first {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  transform-origin: 50% 65%;
  will-change: transform, opacity, filter;
}

.first-teddy {
  opacity: 1;
  animation: teddySwap 5.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.first-edward {
  opacity: 0;
  animation: edwardSwap 5.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes firstNameWidth {
  0%, 20%, 100% {
    width: 3.55em;
  }

  30%, 70% {
    width: 2.75em;
  }

  80% {
    width: 3.55em;
  }
}

@keyframes teddySwap {
  0%, 20%, 100% {
    opacity: 0;
    transform: translateY(-0.5em) rotateX(78deg) skewX(-10deg);
    filter: blur(1.2px);
  }

  28%, 72% {
    opacity: 1;
    transform: translateY(0) rotateX(0) skewX(0);
    filter: blur(0);
  }

  80% {
    opacity: 0;
    transform: translateY(-0.5em) rotateX(78deg) skewX(-10deg);
    filter: blur(1.2px);
  }
}

@keyframes edwardSwap {
  0%, 20%, 100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) skewX(0);
    filter: blur(0);
  }

  30%, 70% {
    opacity: 0;
    transform: translateY(0.45em) rotateX(-70deg) skewX(8deg);
    filter: blur(1.2px);
  }

  80% {
    opacity: 1;
    transform: translateY(0) rotateX(0) skewX(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .name-first,
  .first-teddy,
  .first-edward {
    animation: none;
  }

  .name-first {
    width: 3.55em;
  }

  .first-teddy {
    opacity: 0;
    transform: none;
    filter: none;
  }

  .first-edward {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.sidebar p {
  margin: 0 0 6px;
}

.sidebar .role {
  margin: 2px 0 0;
  font-size: 13px;
}

.sidebar .role-university {
  margin-top: 0;
  margin-bottom: 2px;
}

.sidebar .location {
  font-size: 13px;
  margin-bottom: 3px;
}

.sidebar nav {
  margin: 0;
}

.main {
  padding: 10px;
}

section {
  margin-bottom: 10px;
  border: 1px solid #cfcfcf;
  padding: 8px;
}

h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.entry {
  margin: 0 0 7px;
  padding: 6px;
  border: 1px solid #dfdfdf;
}

.entry:last-child {
  margin-bottom: 0;
}

.title {
  margin: 0;
  font-weight: 700;
}

.org-loc {
  font-weight: 400;
  font-size: 12px;
  color: #444;
}

.meta {
  margin: 1px 0;
}

.date {
  margin: 0 0 4px;
  color: #333;
}

ul {
  margin: 0;
  padding-left: 16px;
}

li {
  margin-bottom: 2px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.below-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.below-split section {
  margin-bottom: 0;
}

.subhead {
  margin: 0 0 5px;
  font-weight: 700;
}

.course-list {
  margin: 0;
  font-size: 13px;
  line-height: 1.18;
}

.course-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 6px;
  margin-bottom: 1px;
}

.course-code {
  white-space: nowrap;
}

.course-name {
  white-space: nowrap;
}

.course-gap {
  height: 4px;
}

.skills-block {
  border: 1px solid #d6d6d6;
  padding: 2px 0;
  background: #fcfcfc;
}

.skill-row {
  display: block;
  padding: 6px 8px 7px;
  border-top: 1px solid #d6d6d6;
}

.skill-row:first-child {
  border-top: 0;
}

.skill-label {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
  color: #111;
}

.skill-values {
  margin: 2px 0 0;
  line-height: 1.24;
}

.small {
  margin-top: 8px;
  font-size: 12px;
}

@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #bbb;
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .below-split {
    grid-template-columns: 1fr;
  }

}
