:root {
  --page-bg: #f4f6f6;
  --card-bg: #ffffff;
  --border: #dddddd;
  --text: #111111;
  --muted: #555f66;
  --link: #0091ff;
  --hover: #a40fc9;
  --paper-hover: #fffdee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  width: 950px;
  margin: 2em auto;
  background: var(--page-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

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

a:hover,
a:focus-visible {
  color: var(--hover);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-lato), Arial, Helvetica, sans-serif;
}

h1 {
  margin-bottom: 0.45em;
  font-size: 23pt;
  font-weight: 400;
  line-height: 1.5;
}

h2 {
  margin: 0 0 0.35em;
  font-size: 17pt;
  font-weight: 700;
}

h3 {
  margin-bottom: 0.5em;
  font-size: 16px;
  font-weight: 700;
}

strong {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

ul {
  margin: 0.55em 0 0;
  padding-left: 1.4em;
}

li {
  padding-bottom: 0.45em;
}

#nav {
  position: fixed;
  top: 50px;
  width: 118px;
  margin: 0 0 0 860px;
  padding: 0;
  z-index: 10;
  list-style: none;
  font-family: Georgia, Helvetica, sans-serif;
  font-size: 15px;
}

#nav li {
  margin-bottom: 1px;
}

#nav a {
  display: block;
  padding: 6px 9px 7px;
  background: #000000;
  color: #ffffff;
}

#nav a:hover,
#nav a:focus-visible {
  color: #f0169d;
}

.header-card {
  min-height: 220px;
  margin-bottom: 1em;
  padding: 1em;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.header-photo {
  float: left;
  width: auto;
  height: 185px;
  margin: 0 2em 0 1em;
  object-fit: cover;
  object-position: center top;
}

.header-info {
  padding: 0.25em 1em 0 0;
  overflow: hidden;
}

.header-info h3,
.header-info p {
  margin-bottom: 0.45em;
  line-height: 1.55;
}

.profile-links {
  margin-bottom: 0.65em !important;
}

.section {
  clear: both;
  margin-bottom: 1.2em;
}

.bio,
.publication-section,
.experience-card,
.education-card,
.info-card {
  border-radius: 10px;
  background: var(--card-bg);
}

.bio {
  padding: 0.65em 0.9em 0.75em;
  line-height: 1.9;
}

.bio p {
  margin-bottom: 0;
}

.publication-section {
  margin-bottom: 1em;
  padding: 1.1em 1.2em 0.75em;
  border: 2px solid var(--border);
  transition: background 150ms ease;
}

.publication-section:hover {
  background: var(--paper-hover);
}

.paper-entry {
  display: flex;
  margin-bottom: 0.75em;
  line-height: 1.85;
}

.paper-number {
  width: 34px;
  margin-right: 0.65em;
  flex-shrink: 0;
  font-weight: 700;
}

.paper-content {
  flex: 1;
}

.paper-venue {
  font-style: italic;
}

.review-note {
  color: #c2077a;
  font-weight: 700;
}

.progress-note {
  color: #438860;
  font-weight: 700;
}

.experience-card {
  margin: 0.4em 0 0.75em;
  padding: 0.8em 1em 0.65em;
  border: 1px solid var(--border);
  transition: background 150ms ease, border-color 150ms ease;
}

.experience-card:hover {
  border-color: #c8c8c8;
  background: var(--paper-hover);
}

.experience-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2em;
}

.experience-heading h3 {
  margin-bottom: 0.2em;
}

.experience-heading span,
.education-item > span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
}

.experience-subtitle {
  margin-bottom: 0.25em;
  color: var(--muted);
  font-style: italic;
}

.education-card {
  padding: 0.25em 1em;
}

.education-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2em;
  padding: 0.85em 0;
  border-bottom: 1px solid #e9e9e9;
}

.education-item:last-child {
  border-bottom: 0;
}

.education-item h3,
.education-item p {
  margin-bottom: 0.25em;
}

.two-column-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8em;
}

.info-card {
  padding: 0.85em 1em 0.65em;
}

.info-card h3 {
  margin-bottom: 0.35em;
}

footer {
  padding: 0.7em 0 1.5em;
  color: #737373;
  text-align: center;
  font-size: 12px;
}

footer p {
  margin: 0;
}

@media screen and (max-width: 980px) {
  body {
    width: auto;
    margin: 1em;
  }

  #nav {
    position: static;
    width: auto;
    margin: 0 0 1.2em;
  }

  #nav li {
    display: inline-block;
    margin: 0 5px 0 0;
  }

  #nav a {
    display: inline-block;
  }
}

@media screen and (max-width: 600px) {
  .header-card {
    padding: 1em 0.9em;
  }

  .header-photo {
    float: none;
    display: block;
    height: 175px;
    margin: 0 auto 0.9em;
  }

  .header-info {
    padding: 0;
    text-align: center;
  }

  h1 {
    font-size: 20pt;
  }

  .paper-entry {
    line-height: 1.65;
  }

  .experience-heading,
  .education-item {
    display: block;
  }

  .experience-heading span,
  .education-item > span {
    display: block;
    margin-bottom: 0.45em;
  }

  .two-column-cards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
