/* Organized publication lists for the Japanese page.
   The surrounding profile keeps the original Bootstrap design. */

.header-subpage-nav {
  min-height: 64px;
}

.header-language-link {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: .3rem 0 .3rem .75rem;
  color: #5b6d64;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.3;
  text-decoration: none;
}

.header-language-link::after {
  content: "→";
  margin-left: .45rem;
  color: #8c9a93;
  transition: transform .15s ease;
}

.header-language-link:hover,
.header-language-link:focus {
  color: #334b40;
  text-decoration: none;
}

.header-language-link:hover::after,
.header-language-link:focus::after {
  transform: translateX(2px);
}

.header-language-link:focus-visible {
  outline: 3px solid rgba(49, 95, 143, .18);
  outline-offset: 3px;
}

.profile-portrait-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.profile-portrait-shell {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  padding: 7px;
  border: 1px solid #dbe3e7;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 9px 25px rgba(45, 56, 61, .10);
}

.profile-portrait-photo {
  display: block;
  width: 152px;
  height: 152px;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
}

.profile-resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 230px;
  margin-top: 14px;
}

.english-profile .profile-resource-links {
  flex-wrap: nowrap;
  max-width: none;
}

.english-profile .profile-resource-links .btn {
  white-space: nowrap;
}

.japanese-profile .profile-resource-links {
  flex-wrap: nowrap;
  max-width: none;
}

.japanese-profile .profile-resource-links .btn {
  white-space: nowrap;
}

/* Quiet, consistent controls that sit comfortably with the original design. */
.row.flex > .col-sm-9 > p > .btn,
.profile-resource-links .btn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 4px 6px 0;
  padding: .34rem .72rem;
  border-width: 1px;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(32, 43, 54, .06);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.25;
  transition: background-color .15s ease, border-color .15s ease,
    box-shadow .15s ease, color .15s ease, transform .15s ease;
}

.row.flex > .col-sm-9 > p > .btn-outline-primary,
.profile-resource-links .btn-outline-primary {
  border-color: #a9bfd2;
  color: #315f8f;
}

.row.flex > .col-sm-9 > p > .btn-outline-primary:hover,
.row.flex > .col-sm-9 > p > .btn-outline-primary:focus,
.profile-resource-links .btn-outline-primary:hover,
.profile-resource-links .btn-outline-primary:focus {
  border-color: #7f9fbd;
  background-color: #edf3f8;
  color: #234d74;
}

.row.flex > .col-sm-9 > p > .btn-outline-success,
.profile-resource-links .btn-outline-success {
  border-color: #aec4b4;
  color: #4d7458;
}

.row.flex > .col-sm-9 > p > .btn-outline-success:hover,
.row.flex > .col-sm-9 > p > .btn-outline-success:focus,
.profile-resource-links .btn-outline-success:hover,
.profile-resource-links .btn-outline-success:focus {
  border-color: #86a48e;
  background-color: #eef4f0;
  color: #365c42;
}

.row.flex > .col-sm-9 > p > .btn:hover,
.profile-resource-links .btn:hover {
  box-shadow: 0 3px 7px rgba(32, 43, 54, .10);
  text-decoration: none;
  transform: translateY(-1px);
}

.row.flex > .col-sm-9 > p > .btn:focus-visible,
.profile-resource-links .btn:focus-visible,
.publication-actions .btn:focus-visible,
.related-links summary:focus-visible,
.reference-link:focus-visible {
  outline: 3px solid rgba(49, 95, 143, .18);
  outline-offset: 2px;
}

.profile-resource-links .btn {
  margin: 0;
}

.profile-position {
  margin-bottom: 9px;
}

.profile-education {
  margin: -2px 0 9px;
  color: #6d7671;
  font-size: .82rem;
  line-height: 1.6;
}

.profile-intro {
  max-width: 700px;
  margin: 0 0 14px;
  color: #5f6762;
  font-size: .9rem;
  line-height: 1.75;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, .85fr);
  gap: 32px;
  margin: 0;
  padding: 26px 28px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
  color: #606864;
  font-size: .875rem;
  line-height: 1.6;
}

.profile-contact-section {
  max-width: 700px;
  margin: 0 0 17px;
}

.profile-contact-section .contact-panel {
  grid-template-columns: minmax(0, 1fr) minmax(330px, auto);
  gap: 22px;
  padding: 0;
}

.english-profile .profile-contact-section .contact-panel {
  grid-template-columns: 1fr;
  gap: 0;
}

.english-profile .profile-contact-section .contact-details {
  padding: 0;
  border: 0;
}

.contact-message {
  max-width: 590px;
  margin: 0;
  color: #66706a;
  line-height: 1.75;
}

.contact-message-line {
  display: block;
}

.contact-details {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
  border-left: 1px solid #dce4df;
  font-style: normal;
}

.contact-details p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.contact-detail-label {
  color: #8a9390;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.contact-detail-value {
  color: #59635d;
  line-height: 1.55;
}

a.contact-detail-value {
  text-decoration: underline;
  text-decoration-color: #c5cec9;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a.contact-detail-value:hover,
a.contact-detail-value:focus {
  color: #315f8f;
  text-decoration-color: #8ba5bb;
}

@media (min-width: 768px) {
  .contact-message-line {
    white-space: nowrap;
  }

  .profile-contact-section .contact-detail-address .contact-detail-value {
    white-space: nowrap;
  }

  .english-profile .contact-detail-address .contact-detail-address-value-en {
    white-space: normal;
  }
}

.organized-list .content-section + .content-section {
  margin-top: 34px;
}

.organized-list .page-header {
  padding-bottom: 7px;
}

.organized-list .page-header h5 {
  margin-bottom: 0;
}

.research-section .page-header h5,
.essay-section .page-header h5 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.research-section .page-header h5::before,
.essay-section .page-header h5::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.research-section .page-header h5::before {
  background-color: #829dad;
}

.essay-section .page-header h5::before {
  background-color: #879b89;
}

.publication-list {
  padding-top: 1px;
}

.publication-item {
  padding: 20px 0 8px;
}

.publication-title {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.publication-title a {
  color: #000;
}

.publication-title a:hover,
.publication-title a:focus {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publication-meta {
  margin: 0;
  color: #495057;
  font-size: .8125rem;
  line-height: 1.55;
}

#日本語論文・研究紹介 .publication-type-label {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  margin: 0 0 7px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .65625rem;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
}

#日本語論文・研究紹介 .publication-type-research {
  background-color: #e7eef2;
  color: #607c8d;
}

#日本語論文・研究紹介 .publication-type-paper {
  background-color: #e8eee9;
  color: #627668;
}

.english-publication-meta {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.english-publication-meta .publication-venue {
  color: #505b62;
  line-height: 1.45;
}

.english-publication-meta .publication-venue strong {
  font-weight: 600;
}

.english-publication-meta .publication-coauthors {
  color: #737c81;
  font-size: .76rem;
  line-height: 1.5;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.publication-actions .btn {
  margin: 0;
  min-height: 28px;
  padding: .25rem .58rem;
  border-color: #d3d9de;
  border-radius: 5px;
  background-color: #fafbfb;
  color: #53616d;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .15s ease, border-color .15s ease,
    color .15s ease;
}

.publication-actions .btn:hover,
.publication-actions .btn:focus {
  border-color: #aeb9c2;
  background-color: #eef2f4;
  color: #303b44;
  text-decoration: none;
}

.english-publications .publication-item {
  display: flex;
  flex-direction: column;
}

.english-publications .publication-actions {
  align-items: center;
  gap: 4px 11px;
  margin-top: auto;
  padding-top: 10px;
}

.english-publications .publication-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  min-height: 0;
  padding: .08rem 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: #66727a;
  font-size: .7rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  transition: color .15s ease;
}

.english-publications .publication-actions .btn::after {
  content: "↗";
  flex: 0 0 auto;
  color: #98a3aa;
  font-size: .68rem;
  line-height: 1;
}

.english-publications .publication-actions .btn:hover,
.english-publications .publication-actions .btn:focus {
  border: 0;
  background-color: transparent;
  box-shadow: none;
  color: #334f61;
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: none;
}

.related-links {
  margin-top: 6px;
}

.related-links summary {
  display: block;
  width: fit-content;
  color: #6c757d;
  cursor: pointer;
  font-size: .75rem;
  list-style: none;
}

.publication-actions.d-inline-flex + .related-links summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.related-links summary::-webkit-details-marker {
  display: none;
}

.related-links summary::before {
  content: "+";
  display: inline-block;
  width: 17px;
  color: #8b9298;
}

.related-links[open] summary::before {
  content: "−";
}

.related-links .publication-actions {
  margin: 6px 0 1px 17px;
}

.reference-link {
  display: inline;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: #6c757d;
  font-size: .75rem;
  font-weight: 400;
  line-height: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.reference-link::before {
  content: "+";
  display: inline-block;
  width: 14px;
  color: #8b9298;
}

.reference-link:hover,
.reference-link:focus {
  background-color: transparent;
  color: #495057;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publication-grid,
.essay-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.publication-grid .publication-item,
.essay-columns .essay-item {
  padding: 17px 18px 16px;
  border: 1px solid #e1e6e3;
  border-radius: 18px;
  background-color: #fff;
  box-shadow: 0 4px 16px rgba(45, 56, 49, .035);
  transition: border-color .18s ease, box-shadow .18s ease,
    transform .18s ease;
}

.publication-grid .publication-item:hover,
.publication-grid .publication-item:focus-within,
.essay-columns .essay-item:hover,
.essay-columns .essay-item:focus-within {
  border-color: #cbd5cf;
  box-shadow: 0 7px 22px rgba(45, 56, 49, .065);
  transform: translateY(-1px);
}

.research-section .publication-grid .publication-item {
  border-color: #dce5ea;
  background-color: #f4f7f9;
  box-shadow: 0 4px 16px rgba(61, 80, 91, .035);
}

.english-publications .publication-grid .publication-item {
  background-color: #fff;
}

.research-section .publication-grid .publication-item:hover,
.research-section .publication-grid .publication-item:focus-within {
  border-color: #c5d4dc;
  box-shadow: 0 7px 22px rgba(61, 80, 91, .065);
}

.essay-section .essay-columns .essay-item {
  border-color: #dfe6dc;
  background-color: #f5f7f3;
  box-shadow: 0 4px 16px rgba(56, 75, 60, .035);
}

.essay-section .essay-columns .essay-item:hover,
.essay-section .essay-columns .essay-item:focus-within {
  border-color: #c8d4c6;
  box-shadow: 0 7px 22px rgba(56, 75, 60, .065);
}

.essay-meta,
.essay-note {
  margin: 0;
  color: #6c757d;
  font-size: .75rem;
  line-height: 1.55;
}

.essay-title {
  margin: 4px 0 5px;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.55;
}

.essay-columns .reference-link {
  margin-left: 0;
}

.popover {
  max-width: min(520px, calc(100vw - 30px));
}

.japanese-site-footer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 50px 0 10px;
  padding: 18px 2px 0;
  border-top: 1px solid #e1e6e3;
  color: #747d78;
  font-size: .75rem;
  line-height: 1.5;
  text-align: center;
}

.japanese-site-footer .footer-name {
  color: #4f5953;
  font-weight: 500;
  letter-spacing: .03em;
}

.japanese-site-footer .footer-affiliation {
  font-size: .72rem;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .english-profile > .profile-portrait-column {
    flex: 0 0 32%;
    max-width: 32%;
  }

  .english-profile > .col-sm-9 {
    flex: 0 0 68%;
    max-width: 68%;
  }

  .japanese-profile > .profile-portrait-column {
    flex: 0 0 32%;
    max-width: 32%;
  }

  .japanese-profile > .col-sm-9 {
    flex: 0 0 68%;
    max-width: 68%;
  }
}

@media (max-width: 991.98px) {
  .profile-contact-section .contact-panel {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-contact-section .contact-details {
    padding: 14px 0 0;
    border-top: 1px solid #dce4df;
    border-left: 0;
  }
}

@media (max-width: 767.98px) {
  .english-profile > .profile-portrait-column,
  .english-profile > .col-sm-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .japanese-profile > .profile-portrait-column,
  .japanese-profile > .col-sm-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .publication-grid,
  .essay-columns {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }

  .profile-contact-section .contact-panel {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .contact-details {
    padding: 17px 0 0;
    border-top: 1px solid #dce4df;
    border-left: 0;
  }
}

@media (max-width: 575.98px) {
  .profile-portrait-column {
    padding-top: 26px;
  }

  .publication-item {
    padding-top: 18px;
  }

  .publication-title {
    font-size: 1rem;
  }

  .japanese-site-footer {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 40px;
  }
}
