:root {
  --paper: #fafaf8;
  --ink: #182027;
  --ink-soft: #535d65;
  --ink-faint: #68737b;
  --line: #d5d9da;
  --line-strong: #aeb4b7;
  --blue: #245da7;
  --blue-dark: #194b89;
  --white: #fff;
  --surface-muted: #eeefec;
  --accent-underline: #b8cce5;
  --tag-bg: #e7f0fa;
  --tag-ink: #245488;
  --timeline-dot: #2a6eb5;
  --timeline-line: #a9c5df;
  --header-shadow: rgba(24, 32, 39, 0.045);
  --selection-ink: #fff;
  --display: "IBM Plex Sans", "Noto Sans JP", sans-serif;
  --sans: "IBM Plex Sans", "Noto Sans JP", sans-serif;
  --jp: "Noto Sans JP", sans-serif;
  --header-height: 58px;
  --shell: min(1040px, calc(100vw - 48px));
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #11171c;
  --ink: #edf2f4;
  --ink-soft: #bac4ca;
  --ink-faint: #929da5;
  --line: #303a41;
  --line-strong: #53616a;
  --blue: #70a7ea;
  --blue-dark: #8ab9ee;
  --surface-muted: #1b242a;
  --accent-underline: #3f6790;
  --tag-bg: #1b3044;
  --tag-ink: #9dc5ee;
  --timeline-dot: #70a7ea;
  --timeline-line: #3b6080;
  --header-shadow: rgba(0, 0, 0, 0.24);
  --selection-ink: #0d1419;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #11171c;
    --ink: #edf2f4;
    --ink-soft: #bac4ca;
    --ink-faint: #929da5;
    --line: #303a41;
    --line-strong: #53616a;
    --blue: #70a7ea;
    --blue-dark: #8ab9ee;
    --surface-muted: #1b242a;
    --accent-underline: #3f6790;
    --tag-bg: #1b3044;
    --tag-ink: #9dc5ee;
    --timeline-dot: #70a7ea;
    --timeline-line: #3b6080;
    --header-shadow: rgba(0, 0, 0, 0.24);
    --selection-ink: #0d1419;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

::selection {
  color: var(--selection-ink);
  background: var(--blue);
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.social-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 8px 13px;
  color: var(--selection-ink);
  background: var(--blue);
  transform: translateY(-160%);
}

.skip-link:focus {
  color: var(--selection-ink);
  transform: translateY(0);
}

.section-anchor {
  scroll-margin-top: calc(var(--header-height) + 18px);
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 14px var(--header-shadow);
}

.site-header__inner {
  display: flex;
  width: var(--shell);
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark__mark {
  display: grid;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wordmark__name {
  font-size: 14px;
  letter-spacing: 0.01em;
}

.site-header__controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.language-switcher {
  position: relative;
  display: inline-flex;
  width: 72px;
  height: 34px;
  padding: 3px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.language-switcher__link {
  position: relative;
  z-index: 1;
  display: grid;
  width: 50%;
  height: 100%;
  color: var(--ink-faint);
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  transition: color 150ms ease;
}

.language-switcher::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 31px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--blue) 72%, transparent);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
  content: "";
  transition: transform 180ms ease, background-color 150ms ease;
}

.language-switcher:has(.language-switcher__link:nth-child(2).is-active)::before {
  transform: translateX(34px);
}

.language-switcher__link:hover,
.language-switcher__link.is-active {
  color: var(--blue);
}

.language-switcher__link:focus-visible {
  z-index: 2;
  outline-offset: -2px;
}

@supports not selector(:has(*)) {
  .language-switcher__link.is-active {
    border-radius: 999px;
    background: var(--paper);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
  }

  .language-switcher::before {
    display: none;
  }
}

.theme-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  place-items: center;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.js .theme-toggle {
  display: grid;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.theme-toggle__icon--sun,
:root[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__icon--moon {
    display: none;
  }

  :root:not([data-theme]) .theme-toggle__icon--sun {
    display: block;
  }
}

.site-nav__list {
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  align-items: center;
  list-style: none;
}

.site-nav__list a {
  position: relative;
  display: block;
  padding-block: 19px 17px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 150ms ease;
}

.site-nav__list a:hover,
.site-nav__list a.is-active {
  color: var(--ink);
}

.site-nav__list a:hover::after,
.site-nav__list a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
}

/* Hero */
.hero {
  padding-block: calc(var(--header-height) + 64px) 64px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(38px, 6vw, 72px);
  align-items: start;
}

.profile-visual {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  object-fit: cover;
}

.hero__content {
  max-width: 730px;
}

.hero h1 {
  display: flex;
  gap: 8px 18px;
  margin-bottom: 18px;
  align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 50px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero__name-ja {
  color: var(--ink-soft);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.48em;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.hero__role {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
}

.research-tags {
  display: flex;
  gap: 7px;
  margin: 0 0 20px;
  padding: 0;
  flex-wrap: wrap;
  list-style: none;
}

.research-tags li {
  padding: 4px 10px;
  color: var(--tag-ink);
  border-radius: 999px;
  background: var(--tag-bg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.hero__contact {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.hero__contact p {
  display: flex;
  gap: 7px;
  margin: 0;
  color: var(--ink-soft);
  align-items: center;
  font-size: 14px;
}

.hero__links {
  display: flex;
  gap: 8px 18px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-link {
  display: inline-flex;
  gap: 6px;
  padding-block: 3px;
  color: var(--blue-dark);
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.hero-link:hover {
  text-decoration: underline;
}

.hero-link--disabled {
  color: var(--ink-faint);
  cursor: not-allowed;
  user-select: none;
}

.hero-link--disabled:hover {
  color: var(--ink-faint);
  text-decoration: none;
}

/* Section composition */
.section {
  padding-block: 68px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(230px, 0.6fr) minmax(0, 1fr);
  gap: 24px 48px;
  margin-bottom: 34px;
  align-items: end;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.section-heading__intro {
  max-width: 560px;
  margin-bottom: 1px;
  color: var(--ink-soft);
  font-size: 17px;
}

.section-heading__intro a {
  color: var(--blue-dark);
  font-weight: 500;
}

/* News */
.news-list {
  display: grid;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.news-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  padding-block: 8px;
  align-items: start;
}

.news-item time {
  padding-top: 2px;
  color: var(--ink-faint);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.news-item p {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.news-item a {
  color: var(--blue-dark);
  font-weight: 500;
}

.news-item a:hover {
  color: var(--blue);
}

/* Publications */
.publication-group {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 38px;
  padding-block: 30px;
  border-top: 1px solid var(--line-strong);
}

.publication-group:last-child {
  padding-bottom: 0;
}

.publication-group__title {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  height: fit-content;
}

.publication-group__title h3 {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.publication-group__title span {
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.publication-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pub;
}

.publication {
  position: relative;
  padding: 0 0 24px 30px;
  border-bottom: 1px solid var(--line);
  counter-increment: pub;
}

.publication + .publication {
  padding-top: 24px;
}

.publication::before {
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--ink-faint);
  content: counter(pub, decimal-leading-zero);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.publication + .publication::before {
  top: 25px;
}

.publication:last-child {
  border-bottom: 0;
}

.publication--with-media article {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0 20px;
  align-items: start;
}

.publication--with-media article > :not(.publication__media) {
  grid-column: 2;
}

.publication__media {
  display: grid;
  width: 180px;
  aspect-ratio: 8 / 5;
  grid-column: 1;
  grid-row: 1 / span 8;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  background: var(--surface-muted);
  place-items: center;
}

.publication__media span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

img.publication__media {
  object-fit: cover;
}

.publication h4 {
  margin-bottom: 5px;
  font-family: var(--display);
  font-size: clamp(21px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.008em;
  line-height: 1.35;
}

.publication p {
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}

.publication p strong {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-underline);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.publication .publication__original {
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-family: var(--jp);
  font-size: 15px;
}

.publication .publication__venue {
  margin-bottom: 5px;
  font-style: italic;
}

.publication__links {
  display: flex;
  gap: 6px 14px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.publication__links a {
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 600;
}

/* Profile */
.profile-sections {
  border-top: 1px solid var(--line-strong);
}

.profile-block {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 38px;
  padding-block: 30px;
  border-bottom: 1px solid var(--line-strong);
}

.profile-block__title {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.profile-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-list li {
  position: relative;
  padding: 0 0 26px 27px;
}

.profile-list li::before {
  position: absolute;
  z-index: 1;
  top: 7px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--timeline-dot);
  box-shadow: 0 0 0 1px var(--timeline-dot);
  content: "";
}

.profile-list li::after {
  position: absolute;
  top: 17px;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: var(--timeline-line);
  content: "";
}

.profile-list li:last-child {
  padding-bottom: 0;
}

.profile-list li:last-child::after {
  display: none;
}

.profile-list--plain li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.profile-list--plain li:first-child {
  padding-top: 0;
}

.profile-list--plain li::before,
.profile-list--plain li::after {
  display: none;
}

.profile-list--plain li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-list__date {
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.profile-list h4 {
  margin-bottom: 1px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.profile-list h4 a {
  color: inherit;
  text-decoration-color: var(--accent-underline);
}

.profile-list h4 a:hover {
  color: var(--blue-dark);
}

.profile-list p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

.profile-list .profile-list__note {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 14px;
}

.profile-source {
  display: inline-block;
  margin-top: 20px;
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 500;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  background: var(--paper);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-block: 20px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

.site-footer p:nth-child(2) {
  text-align: center;
}

.site-footer a {
  color: var(--ink-soft);
  text-align: right;
}

/* Responsive */
@media (max-width: 840px) {
  .hero__grid {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 36px;
  }

  .profile-visual {
    width: 160px;
    height: 160px;
  }

  .publication-group {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
  }

  .publication--with-media article {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0 16px;
  }

  .publication__media {
    width: 150px;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 32px, 620px);
  }

  .site-header__controls {
    gap: 6px;
  }

  .theme-toggle {
    order: 1;
  }

  .language-switcher {
    order: 2;
  }

  .site-nav {
    order: 3;
  }

  .language-switcher {
    font-size: 11px;
  }

  .wordmark__name {
    display: none;
  }

  .site-nav {
    display: flex;
    align-items: center;
  }

  .js .menu-toggle {
    display: flex;
    gap: 8px;
    padding: 8px 0 8px 10px;
    color: var(--ink);
    border: 0;
    background: transparent;
    align-items: center;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  .menu-toggle__icon {
    position: relative;
    display: block;
    width: 20px;
    height: 14px;
  }

  .menu-toggle__icon span {
    position: absolute;
    right: 0;
    width: 20px;
    height: 1px;
    background: currentColor;
    transition: top 150ms ease, transform 150ms ease;
  }

  .menu-toggle__icon span:first-child {
    top: 3px;
  }

  .menu-toggle__icon span:last-child {
    top: 10px;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:first-child {
    top: 7px;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:last-child {
    top: 7px;
    transform: rotate(-45deg);
  }

  .site-nav__list {
    display: grid;
    position: fixed;
    z-index: 99;
    top: var(--header-height);
    right: 0;
    left: 0;
    gap: 0;
    margin: 0;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .js .site-nav__list {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  }

  .js .site-nav__list.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  html:not(.js) .site-nav__list {
    display: flex;
    top: var(--header-height);
    gap: 18px;
    padding: 7px 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .site-nav__list a {
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

  html:not(.js) .site-nav__list a {
    padding: 3px 0;
    border-bottom: 0;
    font-size: 12px;
  }

  .site-nav__list li:last-child a {
    border-bottom: 0;
  }

  .site-nav__list a::after {
    display: none;
  }

  .hero {
    padding-block: calc(var(--header-height) + 42px) 52px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .profile-visual {
    width: 150px;
    height: 150px;
    justify-self: center;
  }

  .hero__content {
    max-width: 620px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .section {
    padding-block: 54px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 28px;
  }

  .publication-group {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .publication-group__title {
    position: static;
  }

  .profile-block {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr auto;
    gap: 5px 14px;
  }

  .site-footer p:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .site-footer a {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 2px;
    padding-block: 9px;
  }

  .news-item time {
    padding-top: 0;
  }

  .publication {
    padding-left: 26px;
  }

  .publication--with-media article {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .publication--with-media article > :not(.publication__media) {
    grid-column: 1;
  }

  .publication__media {
    width: min(100%, 220px);
    margin-bottom: 14px;
    grid-column: 1;
    grid-row: auto;
  }

  .profile-block {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .theme-toggle,
  .skip-link,
  .hero__links,
  .publication__links,
  .site-footer {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 10pt;
  }

  .hero {
    padding-top: 0;
  }

  .section {
    padding-block: 24px;
    break-inside: avoid;
  }

  .publication-group,
  .publication {
    break-inside: avoid;
  }
}
