@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
}

:root {
  --bg: #fff;
  --fg: #333;
  --muted: #bbb;
  --rule: #cfcfcf;
  --thumb-bg: #fff;
  --thumb-border: #e8e8e8;
  --link: #1772d0;
  --link-hover: #f09228;
  --theme-label: #6b6b6b;
}

html:has(#theme-switch:checked) {
  --bg: #1a1a1a;
  --fg: #e0e0e0;
  --muted: #888;
  --rule: #555;
  --thumb-bg: #222;
  --thumb-border: #444;
  --link: #6ba8e5;
  --link-hover: #f0a85a;
  --theme-label: #a5a5a5;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

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

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

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

.page {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 0 24px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2.5% 1% 2.5% 10%;
}

.hero-text {
  flex: 1 1 63%;
  text-align: center;
  padding-left: 28px;
}

.photo-cell {
  flex: 0 1 37%;
  max-width: 37%;
  padding-left: 6%;
  padding-right: 0;
}

.pfp {
  display: block;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.name {
  margin: 0;
  padding-top: 20px;
  font-size: 32px;
  font-weight: normal;
}

.tagline,
.links {
  margin: 1em 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
}

.theme-switch {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  position: fixed;
  top: 10px;
  right: 45px;
  z-index: 20;
  font: 13px / 1.85 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--theme-label);
  cursor: pointer;
  text-underline-offset: 4px;
  user-select: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  text-decoration: underline;
  outline: none;
}

.theme-label-light {
  display: none;
}

html:has(#theme-switch:checked) .theme-label-dark {
  display: none;
}

html:has(#theme-switch:checked) .theme-label-light {
  display: inline;
}

.contact-camera {
  height: 26px;
  width: auto;
  vertical-align: -6px;
  display: inline-block;
}

.contact-diary {
  height: 22px;
  vertical-align: -4px;
}

#history {
  margin: 8px 2.5%;
}

#history .entry {
  display: grid;
  grid-template-columns: 92px 18px 1fr;
}

#history .timespan {
  text-align: right;
  padding-right: 8px;
  color: var(--muted);
}

#history .ico {
  position: relative;
  border-left: 2px solid var(--rule);
}

#history .entry-dot {
  position: absolute;
  top: 4px;
  left: -7px;
  width: 10px;
  height: 10px;
  border-radius: 7px;
  background: var(--rule);
  border: 2px solid var(--bg);
}

#history .desc {
  font-size: 17px;
  line-height: 1.4;
  padding-left: 14px;
  padding-bottom: 22px;
}

#pet-projects {
  margin: 28px 2.5% 8px;
}

#pet-projects .ctitle {
  margin: 0 0 24px;
  padding-top: 8px;
  font-size: 22px;
  font-weight: normal;
  text-align: center;
}

#pet-projects .project {
  display: flow-root;
  margin: 0 0 18px;
}

#pet-projects .pico {
  float: left;
  width: 80px;
}

#pet-projects .pico img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: var(--thumb-bg);
  border: 1px solid var(--thumb-border);
  border-radius: 4px;
}

#pet-projects .pdesc {
  margin-left: 96px;
  font-size: 17px;
  line-height: 1.45;
}

#research {
  margin: 28px 2.5% 8px;
  padding-top: 8px;
}

#research h2 {
  margin: 0 0 24px;
  padding-top: 8px;
  text-align: center;
}

.paper {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 10px 0 20px;
}

.paper-media {
  flex: 0 0 20%;
  max-width: 160px;
}

.paper-thumb {
  display: block;
  max-width: 160px;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--thumb-border);
}

.paper-body {
  flex: 1;
  min-width: 0;
}

.papertitle {
  font-weight: 700;
}

.paper-meta {
  margin: 0.5em 0;
}

.site-credit {
  margin: 28px 2.5% 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.site-credit a {
  color: var(--muted);
}

.site-credit a:hover,
.site-credit a:focus {
  color: var(--link-hover);
}

@media (max-width: 560px) {
  .hero {
    flex-direction: column-reverse;
  }

  .photo-cell {
    max-width: 220px;
    padding: 0;
  }

  .paper {
    flex-direction: column;
    align-items: flex-start;
  }
}
