:root {
  --bg: #ffffff;
  --text: #111;
  --muted: #555;
  --line: #D2D7DA;
  --link: #0b57d0;
  --max: 860px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

header {
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 18px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

h1 {
  margin: 0 0 6px 0;
  font-size: 1.8rem;
  letter-spacing: 0.2px;
}

.sub {
  margin: 0;
  color: var(--muted);
}

.lang-link {
  display: inline-block;
  color: var(--link);
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  white-space: nowrap;
}

.lang-link:hover {
  background: #f6f8ff;
  text-decoration: none;
}

nav {
  margin-top: 14px;
  display: inline-flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 0.98rem;
  padding: 2px;
  justify-content: flex-start;
  max-width: 100%;
  vertical-align: top;
}

nav a {
  color: var(--link);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: transparent;
  white-space: nowrap;
  flex: 0 0 auto;
  border-left: 1px solid var(--line);
}

nav a:first-child {
  border-left: none;
}

nav a:hover {
  background: #f6f8ff;
  text-decoration: none;
}

nav a.active {
  background: var(--link);
  color: #fff;
  text-decoration: none;
}

nav a:focus-visible,
.lang-link:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.meta-dl {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 6px 12px;
  margin: 0;
}

/* 自己紹介：写真つきレイアウト */
.about {
  display: grid;
  --about-photo-w: clamp(120px, 28vw, 160px);
  grid-template-columns: 1fr var(--about-photo-w);
  gap: 14px 18px;
  align-items: start;
}

.about-photo {
  width: 30%;
  max-width: var(--about-photo-w);
  height: auto;
  aspect-ratio: 4 / 3;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f3f3f3;
  justify-self: end;
}

.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}

.about-body p {
  margin-top: 0;
}

/* English home: photo floated to the right */
.float-photo {
  float: right;
  width: clamp(140px, 30vw, 220px);
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 0 0 10px 16px;
  background: #f3f3f3;
}

.float-wrap::after {
  content: "";
  display: block;
  clear: both;
}

/* profile.html 用：写真をレスポンシブ（4:3）に */
.about.about--profile {
  --photo-w: clamp(80px, 60vw, 120px);
  grid-template-columns: 1fr var(--photo-w);
  gap: 10px 18px;
  padding: 10px 0;
}

.about.about--profile .about-photo {
  width: var(--photo-w);
  height: auto;
  aspect-ratio: 4 / 3; /* 横:縦 = 4:3（縦3:横4） */
  margin-top: 0;
  border: 1px solid var(--line);
}

.about.about--profile .about-photo img {
  width: 100%;
  height: 100%;
}

@media (max-width: 520px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about-photo {
    max-width: 100%;
    aspect-ratio: 4 / 3;
    margin-top: 8px;
    justify-self: start;
  }
  .about.about--profile {
    --photo-w: clamp(60px, 60vw, 120px);
  }
  .about.about--profile .about-photo {
    width: var(--photo-w);
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .float-photo {
    float: none;
    display: block;
    width: 100%;
    margin: 8px 0 10px;
  }
}

.meta-dl dt {
  color: var(--muted);
}

.meta-dl dd {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  background: #fff;
  font-size: 0.92em;
}

/* お知らせ（タイムライン） */
.timeline-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 14px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--link);
}

.timeline-item.domestic::before {
  border-color: #0068B7;
}

.timeline-item.international::before {
  border-color: #E60012;
}

.timeline-item.other::before {
  border-color: #D2D7DA;
}

.timeline-item.normal::before {
  border-color: #222426;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 6px 0 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  box-sizing: border-box;
}

.legend-dot.domestic {
  border-color: #0068B7;
}

.legend-dot.international {
  border-color: #E60012;
}

.timeline-date {
  display: inline-block;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

.timeline-title {
  margin: 0;
  font-weight: 650;
}

.timeline-body {
  margin: 2px 0 0;
  color: var(--text);
}

/* 研究発表：年度ごとの折り畳み */
.fy-fold {
  margin-top: 12px;
}

.fy-fold > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  font-weight: 650;
  user-select: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease,
    transform 80ms ease;
}

.fy-fold > summary::-webkit-details-marker {
  display: none;
}

.fy-fold > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.fy-fold > summary:hover {
  background: #f7f7f7;
  border-color: #d2d7da;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}

.fy-fold > summary:active {
  transform: translateY(1px);
}

.fy-fold[open] > summary {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-color: var(--line);
}

.fy-fold[open] > summary::after {
  transform: rotate(-135deg);
  border-color: var(--muted);
}

.fy-fold > .timeline-box {
  margin-top: 10px;
}

.fy-fold > summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.presentations-block {
  margin-top: 14px;
}

.presentations-block h3 {
  margin: 14px 0 8px;
  font-size: 1.05rem;
}

.presentations-block .timeline-box {
  margin-top: 8px;
}

section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
}

ul {
  margin: 8px 0 0 0;
  padding-left: 1.2rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0px 14px 10px;
  background: #fff;
}

.muted {
  color: var(--muted);
}

footer {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 18px 0 40px;
}

code {
  background: #f3f3f3;
  padding: 0 6px;
  border-radius: 6px;
}

/* 少し広い画面では2カラム風に */
@media (min-width: 860px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

