:root {
  --text: #1f2328;
  --muted: #656d76;
  --accent: #0b5cad;
  --rule: #d8dee4;
  --bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --muted: #9198a1;
    --accent: #6cb6ff;
    --rule: #30363d;
    --bg: #0d1117;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

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

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

/* Profile */

.profile {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.portrait {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
}

h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
}

.position {
  margin: 6px 0 12px;
  color: var(--muted);
}

.email {
  margin: 0 0 4px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.bio p {
  margin: 0 0 12px;
}

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

.bio a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Publications */

h2 {
  margin: 56px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.4rem;
  font-weight: 600;
}

h3 {
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.pubs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub {
  margin-bottom: 18px;
}

.pub-title {
  font-weight: 600;
}

.pub-authors,
.pub-venue,
.pub-notes {
  font-size: 0.94rem;
}

.pub-authors .me {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pub-venue,
.pub-notes {
  color: var(--muted);
}

.pub-venue em {
  color: var(--text);
}

.pub-links a {
  margin-right: 12px;
  font-size: 0.9rem;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

/* Mobile */

@media (max-width: 640px) {
  main {
    padding: 32px 16px;
  }

  .profile {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
  }

  .portrait {
    flex-basis: auto;
    width: 160px;
  }

  .contact {
    justify-content: center;
  }

  .bio {
    text-align: left;
  }

  h2 {
    margin-top: 40px;
  }
}
