.cv-content,
#profile,
#research,
#teaching,
#exchange,
#service,
#contact {
  scroll-margin-top: 80px;
}

#top .image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

#top .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

#top > .row > div:last-child {
  min-width: 0;
}

#top header {
  margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}

#top h1 {
  margin: 0;
  font-size: clamp(2.25rem, 2rem + 1.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

#top p {
  max-width: 68ch;
  margin: 0 0 clamp(1rem, 0.75rem + 1vw, 1.5rem);
  font-size: clamp(1rem, 1rem + 0.25vw, 1.25rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.wrapper.style3:has(> #research) {
  padding-bottom: clamp(3rem, 4vw, 4rem);
}

.wrapper.style3:has(> #service) {
  padding-bottom: clamp(3rem, 4vw, 4rem);
}

.wrapper.style4 {
  padding-block: clamp(3.5rem, 5vw, 5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
  width: min(980px, calc(100% - 2rem));
  text-align: left;
}

#contact header {
  margin: 0;
}

#contact header h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 1.5rem + 0.75vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

#contact header span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  line-height: 1.6;
}

#contact header p {
  margin: 0;
  color: #b8b8b8;
  font-size: 1rem;
  line-height: 1.65;
}

#contact > .row {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  align-self: end;
}

#contact > .row > .12u {
  width: auto;
  padding: 0;
  float: none;
}

#contact .site-copyright {
  color: #a0a0a0;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.cv-content {
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

.cv-content h3 {
  margin: 2.4em 0 0.8em;
  color: #3e3e3e;
}

.cv-content h3:first-child {
  margin-top: 0;
}

.cv-content p {
  margin: 0 0 0.75em;
}

.cv-content ol,
.cv-content ul {
  margin: 0 0 1.5em;
  padding-left: 1.7em;
  list-style-position: outside;
}

.cv-content ol { list-style-type: decimal; }
.cv-content ul { list-style-type: disc; }
.cv-content li { padding-left: 0.35em; margin-bottom: 0.65em; }
.cv-content li p { margin: 0; }
.cv-content sup { color: #43b3e0; }
.cv-content em { font-weight: 600; }
.profile-block { max-width: 900px; margin: 0 auto; }
.cv-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 2em; padding: 1.2em 0; border-top: solid 1px rgba(0, 0, 0, 0.08); }
.cv-row > div:last-child { text-align: right; }

@media screen and (min-width: 737px) and (max-width: 960px) {
  body {
    min-width: 0;
  }

  .container {
    width: calc(100% - 2rem);
  }
}

@media screen and (max-width: 736px) {
  .cv-content { font-size: 0.95em; }
  .cv-content ol, .cv-content ul { padding-left: 1.35em; }
  .cv-row { grid-template-columns: 1fr; gap: 0.35em; }
  .cv-row > div:last-child { text-align: left; color: #777; }
  .wrapper.style4 { padding-block: 3rem; }
  #contact { grid-template-columns: 1fr; gap: 1.75rem; }
  #contact .site-copyright {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    white-space: normal;
  }
}

@media print {
  #nav, .wrapper.style4 { display: none; }
  .wrapper { padding: 1.5em 0 !important; box-shadow: none !important; }
}
