:root {
  --blue: #007fc4;
  --ink: #173247;
  --muted: #586b78;
  --line: #dce7eb;
  --paper: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

.page-width { width: min(800px, calc(100% - 40px)); margin-inline: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #006394; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 3px; }
h1, h2, h3, p, li { overflow-wrap: break-word; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 2;
  padding: 8px 14px;
  background: var(--blue);
  color: var(--paper);
}
.skip-link:focus { top: 12px; color: var(--paper); }

.profile-header {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 45% 0%, rgba(0, 127, 196, .09), transparent 70%),
    linear-gradient(180deg, #f8fcfe, #fff);
}
.profile {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding-block: 56px;
}
.profile-photo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
}
.profile-details { min-width: 0; }
.profile h1 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.025em;
}
.profile-name-ja { display: inline-block; }
.profile-affiliation { margin: 0; font-size: 1.0625rem; line-height: 1.7; }
.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  text-decoration: none;
}
.social-link:hover { background: rgba(0, 127, 196, .07); }
.social-link svg { display: block; width: 32px; height: 32px; }

main.page-width { padding-bottom: 64px; }
.content-section { margin-top: 52px; }
.content-section h2,
.content-section h3 {
  width: fit-content;
  max-width: 100%;
}

.content-section h2 {
  margin: 0 0 15px;
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -.025em;
}
/* h3の余白は現在、ブラウザの標準値なので追加します */
.content-section h3 {
  margin: 40px 0 5px; /* 上40px・左右0・下10px */
}
/* h2の直後のh3だけは、h2の下余白で間隔を決める */
.content-section h2 + h3 {
  margin-top: 0;
}
.content-section h2::after,
.content-section h3::after {
  content: "";
  display: block;
  width: 100%;
  border-radius: 2px;
}

.content-section h2::after {
  height: 3px;
  margin-top: 5px;
  background: linear-gradient(90deg, var(--blue), #dce7eb);
}

.content-section p { margin: 0; }
.about-section p + p { margin-top: 16px; }
.content-section ul { margin: 0; padding-left: 2.00em; list-style: disc; }
.content-section li { padding-block: 10px; }
.content-section li:first-child { padding-top: 0; }
.content-section li:last-child { padding-bottom: 0; }
/* .content-section li + li { border-top: 1px solid var(--line); } */
.content-section li a:hover { border-color: var(--blue); background: #f5f9fb; }
.publications-section strong u { text-decoration-thickness: 1px; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .page-width { width: calc(100% - 32px); }
  .profile { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 28px; padding-block: 36px; }
  .profile-details { width: 100%; text-align: center; }
  .profile h1 { font-size: 1.75rem; }
  .profile-affiliation { font-size: 1rem; }
  .social-links { justify-content: center; margin-top: 20px; }
  .content-section { margin-top: 40px; }
  .content-section h2 { font-size: 1.625rem; }
  main.page-width { padding-bottom: 48px; }
}
