html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Edo-kiriko-inspired watermark, kept behind all page content. */
body { isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../patterns/kiriko.svg");
  background-size: 144px 144px;
  opacity: .20;
  -webkit-mask-image: linear-gradient(90deg, #000, rgb(0 0 0 / .55) 28%, rgb(0 0 0 / .55) 72%, #000);
  mask-image: linear-gradient(90deg, #000, rgb(0 0 0 / .55) 28%, rgb(0 0 0 / .55) 72%, #000);
}
@media print { body::before { display: none; } }

body {
  max-width: 850px;
  margin: 32px auto;
  padding: 0 24px;
  background: #edf2f5;
  color: #111;
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

a { color: #0000ee; }
a:visited { color: #551a8b; }
a:focus-visible, summary:focus-visible { outline: 2px solid #0000ee; outline-offset: 3px; }

h1, h2, h3 { color: #174f39; }
h1 { color: #0b633f; }
h3 a, h3 a:visited { color: #0000ee; }
h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.25; }
h2 { margin: 28px 0 12px; font-size: 23px; }
h3 { margin: 0 0 3px; font-size: 17px; }
p { margin: 0 0 12px; }
hr { margin: 0 0 24px; border: 0; border-top: 2px solid #888; }
.name-en { font-family: Garamond, Baskerville, "Times New Roman", serif; font-variant: normal; }
.name-ja { display: inline-block; margin-left: 12px; font-family: "UD Digi Kyokasho NP", "UD Digi Kyokasho NP-R", "UD Digi Kyokasho N", "BIZ UDPMincho", "Yu Mincho", serif; font-size: 26px; font-weight: normal; }

.profile { display: flex; align-items: center; gap: 32px; margin-bottom: 28px; }
.profile > div { min-width: 0; }
.portrait { display: block; width: 180px; height: auto; flex-shrink: 0; }
.profile-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.paper { margin-bottom: 22px; }
.paper > p { margin: 2px 0; }
.paper > .paper-coauthors, .paper > .paper-citation { margin-left: 1.25em; }
.revision { font-size: 15px; }
summary { width: fit-content; color: #0000ee; text-decoration: underline; cursor: pointer; }
details { margin-top: 6px; }
details p { margin: 8px 0 0; }
footer { margin-top: 32px; padding-top: 12px; border-top: 1px solid #888; font-size: 14px; }

.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { position: static; }

@media (max-width: 640px) {
  body { margin: 24px auto; padding: 0 20px; line-height: 1.65; }
  h1 { font-size: 36px; text-align: center; }
  .name-en { display: block; }
  .name-ja { display: block; margin: 8px 0 0; font-size: 24px; }
  hr { margin-bottom: 24px; }
  .profile { flex-direction: column; align-items: center; gap: 20px; }
  .portrait { width: 160px; max-width: 100%; }
  .profile > div { width: 100%; text-align: center; }
  .profile p { margin-bottom: 16px; }
  .profile nav { max-width: 360px; margin: 4px auto 0; }
  .profile-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
  .profile-links li { display: flex; }
  .profile-links a { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 6px 4px; box-sizing: border-box; }
  .bio p { margin-bottom: 16px; }
  h2 { margin: 32px 0 14px; font-size: 24px; line-height: 1.3; }
  h3 { font-size: 18px; line-height: 1.45; }
  .paper > p { margin: 6px 0; }
  .revision { font-size: 16px; }
  summary { min-height: 44px; padding: 6px 0; box-sizing: border-box; }
}
