:root {
  --bg: #fbfaf6;
  --ink: #202427;
  --muted: #687278;
  --soft: #f0eee8;
  --soft-strong: #e6e0d4;
  --accent: #2d7467;
  --accent-deep: #1f5d53;
  --blue: #335f8f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
}

a {
  color: var(--blue);
}

.page {
  width: min(920px, calc(100% - 34px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.intro {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin-bottom: 46px;
}

.portrait-column {
  display: grid;
  justify-items: center;
  gap: 0.86rem;
}

.portrait {
  width: 240px;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
  object-position: 55% 40%;
  box-shadow: 0 18px 58px rgba(30, 36, 39, 0.1);
}

.name-jp {
  margin: 2px 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 9vw, 5rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.role {
  margin-bottom: 0.5rem;
  font-size: 1.23rem;
  font-weight: 600;
  line-height: 1.35;
}

.bio {
  max-width: 620px;
  margin-bottom: 1.05rem;
  color: var(--muted);
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.46rem;
  width: 100%;
}

.icon-link,
.cv-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--soft-strong);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.icon-link {
  width: 2.25rem;
}

.cv-link {
  gap: 0.42rem;
  padding: 0 0.85rem;
  font-weight: 700;
}

.scholar-link {
  gap: 0.34rem;
  padding: 0 0.58rem;
  font-size: 0.82rem;
}

.social-links::after {
  order: 9;
  flex-basis: 100%;
  height: 0;
  content: "";
}

.cv-download {
  order: 10;
}

.icon-link:hover,
.cv-link:hover {
  background: #f6fbf8;
  box-shadow: inset 0 0 0 1px rgba(45, 116, 103, 0.45), 0 7px 22px rgba(45, 116, 103, 0.1);
  transform: translateY(-1px);
}

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-link:nth-child(2) svg,
.icon-link:nth-child(3) svg {
  fill: currentColor;
  stroke: none;
}

.section {
  margin-top: 34px;
}

.section h2,
.intro-interests h2,
.intro-languages h2 {
  margin-bottom: 0.9rem;
  color: var(--accent-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 500;
  letter-spacing: 0;
}

.intro-interests {
  margin-top: 0.9rem;
}

.intro-languages {
  margin-top: 0.72rem;
}

.intro-interests h2,
.intro-languages h2 {
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.32rem 0.66rem;
  border-radius: 999px;
  background: #eef7f3;
  color: var(--accent-deep);
  font-size: 0.83rem;
  line-height: 1.25;
  box-shadow: inset 0 0 0 1px rgba(45, 116, 103, 0.18), 0 6px 18px rgba(31, 52, 48, 0.035);
}

.publication-list,
.item-list {
  display: grid;
  gap: 1.05rem;
}

.publication,
.item {
  max-width: 760px;
}

.publication h3,
.item h3 {
  margin-bottom: 0.14rem;
  font-size: 1.02rem;
  line-height: 1.38;
}

.publication p,
.item p {
  margin-bottom: 0.13rem;
  color: var(--muted);
}

.me {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.48rem;
}

.paper-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.76rem;
  padding: 0 0.68rem;
  border-radius: 999px;
  background: #eef7f3;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(45, 116, 103, 0.18);
}

.paper-links a:hover {
  background: #e1f0ea;
}

.compact {
  gap: 0.86rem;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 1.5rem;
  align-items: start;
}

.item h3 {
  grid-column: 1;
}

.item > p:not(.meta),
.item .notes {
  grid-column: 1 / -1;
}

.meta {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  color: #7a858a;
  font-size: 0.94rem;
}

.notes {
  margin: 0.5rem 0 0;
  padding-left: 1.65rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 28px, 520px);
    padding-top: 34px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 36px;
  }

  .portrait-column {
    justify-items: start;
  }

  .social-links {
    justify-content: flex-start;
  }

  .portrait {
    width: 210px;
  }

  h1 {
    font-size: 3rem;
  }

  .role {
    font-size: 1.08rem;
  }

  .section {
    margin-top: 30px;
  }

  .item {
    grid-template-columns: 1fr;
  }

  .meta {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2.55rem;
  }
}
