/* Base */

:root {
  color-scheme: light dark;
  --ink: #172624;
  --muted: #5d6e6a;
  --paper: #fcfcfa;
  --line: #d9e1de;
  --field-border: #7a8b86;
  --accent: #176b60;
  --accent-dark: #10483f;
  --pale: #eef4f1;
  --header-bg: rgba(252, 252, 250, .76);
  --hero-text: #3d514c;
  --underline: #a0c7bd;
  --selection-bg: #d4e9e2;
  --button-text: #fff;
  --surface: rgba(255, 255, 255, .58);
  --shadow-soft: 0 12px 32px rgba(24, 48, 43, .08);
  --shadow-lift: 0 14px 28px rgba(14, 65, 56, .16);
  --max: 1000px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8efeb;
    --muted: #9baca6;
    --paper: #121917;
    --line: #33423d;
    --field-border: #6b7f78;
    --accent: #66cdb4;
    --accent-dark: #a0ecd8;
    --pale: #1b2824;
    --header-bg: rgba(18, 25, 23, .76);
    --hero-text: #c1d0ca;
    --underline: #41675e;
    --selection-bg: #214238;
    --button-text: #0c1211;
    --surface: rgba(34, 48, 43, .64);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, .2);
    --shadow-lift: 0 14px 28px rgba(0, 0, 0, .28);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.82;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.site-name {
  font-feature-settings: "palt" 1;
}

time {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--underline);
  transition: color .18s ease, background-color .18s ease, text-decoration-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}

::selection {
  background: var(--selection-bg);
}

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

.container {
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: auto;
}

/* Header */

.site-header {
  container: site-header / inline-size;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 80%, transparent);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.site-name {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.site-name small {
  display: block;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .045em;
}

.nav {
  display: flex;
  align-items: center;
  gap: .2rem;
  font-size: .875rem;
}

.nav a {
  color: var(--ink);
  padding: .34rem .6rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--accent-dark);
  background: var(--pale);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--pale);
  font-weight: 700;
}

.menu-button {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.menu-button:hover,
.menu-button[aria-expanded="true"] {
  background: var(--pale);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  padding: .13rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .025em;
}

.language-switch a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 1.9rem;
  padding: .3rem .5rem;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

/* 操作領域は文字サイズ設定に関係なく44px（CSSピクセル）を確保する。 */
.language-switch a::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 44px;
  transform: translateY(-50%);
}

.language-switch a:hover {
  color: var(--accent-dark);
}

.language-switch a[aria-current="page"] {
  background: var(--accent);
  color: var(--button-text);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--accent) 20%, transparent);
}

.language-switch a:active {
  transform: scale(.94);
}

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

/* キーボード操作時だけ表示する「本文へ移動」リンク。 */
.skip-link {
  position: absolute;
  top: .6rem;
  left: .6rem;
  z-index: 100;
  padding: .7rem 1.05rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-text);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus {
  transform: none;
}

.skip-link:hover {
  background: var(--accent-dark);
  color: var(--button-text);
}

/* スキップ先の main は操作対象ではないため枠を出さない（リンク・ボタン等のフォーカス枠は従来どおり）。 */
#main:focus {
  outline: none;
}

/* Hero */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 7.4rem) 0 clamp(3.5rem, 7vw, 5.4rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 15%, color-mix(in srgb, var(--accent) 17%, transparent), transparent 26rem),
    linear-gradient(135deg, var(--paper) 0%, color-mix(in srgb, var(--pale) 78%, var(--paper)) 100%);
}

.page-hero.compact {
  padding: 3.3rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.page-hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1.16;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.page-hero p:not(.eyebrow) {
  max-width: 44rem;
  margin: 1.55rem 0 0;
  font-size: 1.02rem;
  color: var(--hero-text);
  text-wrap: pretty;
  /* 日本語は文節単位で改行する（対応ブラウザのみ。英語ページには影響しない）。 */
  word-break: auto-phrase;
}

.home-hero {
  padding: clamp(2.75rem, 6vw, 4rem) 0 clamp(2.25rem, 5vw, 3.25rem);
}

.page-hero .hero-name {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
  line-height: 1.2;
}

/* 副表記（ja では英語名，en では日本語名）は補助的な大きさにする。 */
.page-hero .hero-name-sub {
  display: block;
  margin-top: .4rem;
  color: var(--muted);
  font-size: clamp(1rem, .9rem + .4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.4;
}

.page-hero p.hero-affiliation {
  margin-top: 1.1rem;
  font-weight: 600;
}

.page-hero p.hero-lead {
  margin-top: .5rem;
}

/* Content */

.section {
  padding: clamp(3.4rem, 7vw, 5.6rem) 0;
}

.section-tint {
  background: var(--pale);
}

.section h2 {
  margin: 0 0 1.55rem;
  font-size: clamp(1.35rem, 2vw, 1.62rem);
  letter-spacing: -.025em;
}

.section h3 {
  font-size: 1rem;
}

/* 投稿カード内の段落は下の .post-entry 用ルールで余白を管理するため除外する（:where() で詳細度は 0,1,1 のまま）。 */
.section p:not(:where(.post-entry *)) {
  margin: 0 0 1rem;
}

.button {
  display: inline-block;
  padding: .7rem 1.08rem;
  background: var(--accent);
  color: var(--button-text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 999px;
  letter-spacing: .02em;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 22%, transparent);
}

.button:hover {
  background: var(--accent-dark);
  color: var(--button-text);
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}

.button:active {
  transform: scale(.97);
  box-shadow: none;
}

.button-outline {
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
}

.button-outline:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--button-text);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* 上余白は .section p（詳細度 0,1,1）に負けないよう，同等以上の詳細度で指定する。 */
.button-row,
.section .button-row {
  margin: 2rem 0 0;
}

.button-row .button {
  margin: 0;
}

.link-list,
.simple-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list {
  max-width: 44rem;
}

.news-list li {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: var(--surface);
  font-size: 1rem;
}

.news-list time {
  display: block;
  margin-bottom: .2rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .035em;
}

.news-list li + li {
  margin-top: .7rem;
}

.news-list p {
  margin: 0;
}

.news-list .news-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.4rem;
  margin-top: .45rem;
}

.news-links a {
  position: relative;
  font-size: .875rem;
  font-weight: 700;
}

/* 文字の高さに関係なく，操作領域の高さを44pxにする（レイアウトは変えない）。 */
.news-links a::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 44px;
  transform: translateY(-50%);
}

/* 外部サイトへのリンクであることを示す（読み上げでは無視させる）。 */
.news-links a[target="_blank"]::after {
  content: "\2197";
  content: "\2197" / "";
  margin-left: .2em;
  font-weight: 400;
}

.post-list {
  display: grid;
  gap: 1.25rem;
}

.post-list > * {
  min-width: 0;
}

.post-entry {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
  overflow-wrap: break-word;
}

.post-type,
.post-date {
  margin: 0;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
}

.post-entry h2 {
  margin: .35rem 0 .25rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.post-entry p:not(.post-type):not(.post-date):not(.post-links) {
  max-width: 68ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.post-media {
  width: min(100%, 620px);
  margin: 1.35rem 0 0;
}

.post-cover {
  width: min(100%, 360px);
}

.post-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(29, 41, 40, .08);
}

.post-media figcaption {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.post-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin: 1.25rem 0 0;
}

.post-links a {
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.profile-photo {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.profile-intro {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

.profile-intro .profile-photo {
  margin: 0;
}

/* 日本語は文節単位で改行する（対応ブラウザのみ。英語ページには影響しない）。 */
.profile-intro p {
  word-break: auto-phrase;
}

.profile-links {
  margin: 0;
}

.profile-links > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: .15rem 1rem;
  padding: .55rem 0;
  border-top: 1px solid var(--line);
}

.profile-links > div:last-child {
  border-bottom: 1px solid var(--line);
}

.profile-links dt {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
}

.profile-links dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.orcid-icon {
  width: 1em;
  height: 1em;
  margin-inline-end: .4em;
  vertical-align: -.125em;
}

/* 長いURLやDOIが列幅を超える場合は折り返す。 */
.content {
  max-width: 44rem;
  overflow-wrap: break-word;
}

.content-wide {
  max-width: none;
}

/* 本文用の共通タイポグラフィ。投稿カード（.post-entry）は独自設計のため適用範囲から外す。
   :where() は詳細度 0 のため，除外を加えても他ページの詳細度関係は変わらない。 */
.content h2:not(:where(.post-entry *)) {
  margin: 0 0 1.15rem;
}

.content h2:not(:first-child):not(:where(.post-entry *)) {
  margin-top: 3rem;
}

.content h3:not(:where(.post-entry *)) {
  margin: 1.6rem 0 .35rem;
}

.content p:not(:where(.post-entry *)),
.content li:not(:where(.post-entry *)) {
  font-size: 1rem;
}

/* class 付きのリスト（.link-list, .timeline 等）は各ルールで余白を管理するため除外する。 */
.content ul:where(:not([class])) {
  padding-left: 1.3rem;
}

.timeline,
.award-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline time,
.award-list time {
  color: var(--muted);
  font-size: .8125rem;
}

.timeline p {
  margin: 0;
}

.publication {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.publication,
.timeline li,
.award-list li,
.link-list li,
.post-entry {
  scroll-margin-top: 6rem;
}

.publication:last-child {
  border-bottom: 1px solid var(--line);
}

.publication h3 {
  margin: .25rem 0 .35rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 600;
}

.publication p {
  margin: .2rem 0;
  font-size: 1rem;
}

.content .publication-year {
  display: inline-block;
  margin: 1.5rem 0 .45rem;
  padding: .22rem .58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: .04em;
}

.content h2 + .publication-year {
  margin-top: 0;
}

.publication a {
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.cover-art {
  width: min(100%, 360px);
  margin: 1.4rem 0 0;
}

.cover-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(29, 41, 40, .08);
}

.cover-art figcaption {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.content h2.presentation-year {
  margin-top: 2.6rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--accent);
  font-size: 1.12rem;
}

/* 本文の先頭に来る年見出しは，セクションの上余白と重ならないようにする。 */
.content > h2.presentation-year:first-child {
  margin-top: 0;
}

.content .list-note {
  margin: .6rem 0 .2rem;
  color: var(--muted);
  font-size: .875rem;
}

.presentation-list {
  margin: 0;
  padding-left: 1.4rem;
}

.presentation-list li {
  padding: .6rem 0 .6rem .2rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.calculator-card {
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}

.calculator-card h2,
.calculator-explanation h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.calculator-form fieldset {
  min-width: 0;
  margin: 0 0 1rem;
  padding: .85rem;
  border: 1px solid var(--line);
}

.calculator-form legend {
  padding: 0 .35rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
}

.calculator-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 1fr);
  gap: .55rem .7rem;
  align-items: center;
}

.calculator-fields label {
  font-size: .875rem;
}

.calculator-fields input,
.calculator-fields select {
  width: 100%;
  min-width: 0;
  padding: .4rem .45rem;
  border: 1px solid var(--field-border);
  border-radius: .25rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.calculator-card .button {
  width: 100%;
  margin-top: .15rem;
  cursor: pointer;
}

.calculator-message {
  margin: .7rem 0 0;
  color: var(--accent);
  font-size: .875rem;
}

.calculator-result {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: .875rem;
}

.calculator-result caption {
  margin-bottom: .45rem;
  text-align: left;
  color: var(--muted);
  font-size: .8125rem;
}

.calculator-result th,
.calculator-result td {
  padding: .55rem .45rem;
  border: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.calculator-result th {
  font-weight: 700;
}

.calculator-result.compact-result {
  font-size: .8125rem;
}

.calculator-result.compact-result th,
.calculator-result.compact-result td {
  padding: .48rem .38rem;
  white-space: nowrap;
}

.calculator-result.compact-result td:last-child,
.calculator-result.compact-result th:last-child {
  white-space: normal;
}

.calculator-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin: 1.2rem 0 1rem;
}

.calculator-summary-item {
  padding: .8rem .75rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--surface);
}

.calculator-summary-item dt {
  color: var(--muted);
  font-size: .8125rem;
}

.calculator-summary-item dd {
  margin: .15rem 0 0;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.calculator-status {
  margin: 1rem 0;
  padding: .7rem .85rem;
  border-left: 3px solid var(--accent);
  background: var(--pale);
  font-size: .875rem;
}

.calculator-table-scroll {
  overflow-x: auto;
  margin-top: 1rem;
}

.calculator-table-scroll .calculator-result {
  margin-top: 0;
}

.calculator-rounding-warning {
  margin: .65rem 0 0;
  padding: .55rem .7rem;
  border-left: 3px solid var(--accent);
  background: var(--pale);
  color: var(--ink);
  font-size: .8125rem;
  line-height: 1.65;
}

.calculator-explanation {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.calculator-explanation p {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.75;
}

.calculator-formula {
  padding: .8rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--pale);
}

.symbol-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.symbol-group {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: var(--surface);
}

.symbol-group h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}

.symbol-group p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .875rem;
}

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: .45rem;
}

.symbol-button {
  min-width: 0;
  padding: .55rem .35rem .45rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.symbol-button:hover {
  border-color: var(--accent);
  background: var(--pale);
  transform: translateY(-1px);
}

.symbol-button:active {
  transform: scale(.97);
}

.symbol-button .symbol-character {
  display: block;
  min-height: 1.8rem;
  color: var(--accent);
  font-family: "Times New Roman", "Noto Serif", serif;
  font-size: 1.45rem;
  line-height: 1.3;
}

.symbol-button .symbol-label,
.symbol-button .copy-label {
  display: block;
  overflow-wrap: anywhere;
}

.symbol-button .symbol-label {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.35;
}

.symbol-button .copy-label {
  margin-top: .25rem;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 700;
}

.copy-status {
  min-height: 1.5em;
  margin-top: 1.2rem;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 700;
}

/* 計算結果のコピー操作。境界は入力欄と同じく識別できる濃さにする。 */
.copy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .6rem;
  margin-top: .8rem;
}

.copy-button {
  min-height: 44px;
  padding: .45rem 1rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.copy-button:hover {
  border-color: var(--accent);
  background: var(--pale);
}

.copy-feedback {
  color: var(--accent);
  font-size: .875rem;
  font-weight: 700;
}

.award-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
}

.award-list p {
  margin: 0;
  line-height: 1.45;
}

.award-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.link-list li {
  border-top: 1px solid var(--line);
}

.link-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.link-list a {
  display: block;
  padding: 1.1rem 0;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-list strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.link-list span {
  color: var(--muted);
  font-size: .875rem;
}

/* Footer */

.footer {
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding: 2.7rem 0;
  background: color-mix(in srgb, var(--pale) 56%, var(--paper));
  color: var(--muted);
  font-size: .8125rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Responsive */

/* 横向きタブレットなど，タッチ操作で横並びナビが表示される場合も操作領域を確保する。 */
@media (pointer: coarse) {
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ヘッダーの折り畳み判定をコンテナクエリにする。em はヘッダー自身（.site-header）の文字サイズが基準になるため，
   ブラウザの既定文字サイズを拡大するとヘッダーの実効幅が広がり，より早く（広い画面幅で）折り畳まれる。 */
@container site-header (max-width: 48.75em) {
  /* 文字を大きく設定したときは，言語切替などを次の行へ折り返す。 */
  .header-inner {
    position: relative;
    min-height: 70px;
    flex-wrap: wrap;
    gap: .25rem 1rem;
  }

  .header-actions {
    margin-left: auto;
    gap: .35rem;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-size: .875rem;
  }

  .nav {
    display: none;
    position: absolute;
    z-index: 3;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    /* 包含ブロック（.header-inner）の高さ＝ヘッダーの高さを差し引き，ヘッダーが複数行になってもメニューの下端を画面内に収める。 */
    max-height: calc(100vh - 100%);
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem var(--gutter) 1.3rem;
    background: var(--paper);
    box-shadow: 0 14px 24px rgba(24, 48, 43, .1);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: .5rem .65rem;
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 48.75em) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .symbol-groups {
    grid-template-columns: 1fr;
  }

  .calculator-summary {
    grid-template-columns: 1fr;
  }

  .timeline li,
  .award-list li {
    grid-template-columns: 100px 1fr;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner p {
    margin: .25rem 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .button:hover {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    backdrop-filter: none;
  }

  .news-list li,
  .button-outline {
    background: var(--paper);
  }
}

@media (prefers-contrast: more) {
  .nav a[aria-current="page"],
  .news-list li,
  .button-outline {
    border: 1px solid var(--accent);
  }
}

@media (max-width: 26.25em) {
  :root {
    --gutter: 15px;
  }

  .timeline li,
  .award-list li {
    grid-template-columns: 1fr;
    gap: .1rem;
  }
  .site-name {
    font-size: .94rem;
  }

  .site-name small {
    font-size: .8125rem;
  }

  .language-switch a {
    padding-inline: .34rem;
  }

  .profile-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-intro .profile-photo {
    max-width: 120px;
  }

  .profile-links > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Print */

@page {
  margin: 16mm 14mm;
}

@media print {
  /* 画面のダークモード設定に関係なく，白地・黒文字で印刷する。 */
  :root {
    color-scheme: light;
    --ink: #000;
    --muted: #444;
    --paper: #fff;
    --line: #999;
    --field-border: #666;
    --accent: #000;
    --accent-dark: #000;
    --pale: #fff;
    --header-bg: #fff;
    --hero-text: #222;
    --underline: #000;
    --selection-bg: #ddd;
    --button-text: #fff;
    --surface: transparent;
    --shadow-soft: none;
    --shadow-lift: none;
  }

  .skip-link,
  .site-header,
  .menu-button,
  .language-switch,
  .button,
  .copy-actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .page-hero {
    padding: 1.5rem 0;
    background: none;
  }

  .section {
    padding: 1.5rem 0;
  }

  .footer {
    background: none;
  }

  .post-media img,
  .cover-art img {
    box-shadow: none;
    transform: none;
  }

  /* 紙面では図を小さくし，論文情報と図を同じページに収めやすくする。 */
  .post-media {
    width: 120mm;
  }

  .cover-art,
  .post-cover {
    width: 55mm;
  }

  .content .publication-year {
    display: block;
    width: fit-content;
  }

  /* 論文情報・発表・受賞などの項目の途中で改ページしない。 */
  .publication,
  .timeline li,
  .award-list li,
  .news-list li,
  .presentation-list li,
  .link-list li,
  .calculator-card,
  .calculator-summary-item,
  .symbol-group,
  figure,
  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* 投稿は図を含めると1ページを超えるため，枠を外して項目の途中での改ページを許す。 */
  .post-entry {
    padding: 1rem 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .post-entry h2,
  .post-date {
    break-after: avoid;
    page-break-after: avoid;
  }

  h1,
  h2,
  h3,
  .publication-year {
    break-after: avoid;
    page-break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }
}
