/* 日英共通の見た目。基本色・フォントは:root、画面幅による切替は@mediaを編集する。 */
/* ============================================================
   計測情報工学研究室 (ICE Lab) — 共通スタイルシート
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  /* Color */
  --paper: #FFFFFF;
  --paper-raised: #FFFFFF;
  --ink: #000000;
  --ink-soft: #3C525A;
  --ink-faint: #000000;
  --line: #D8D4C9;
  --line-strong: #B9C4C2;
  --accent: #5B4B9E;
  /* 紫 */
  --accent-soft: #E7E3F5;
  /* 薄紫 */
  --blue-soft: #E1E9F7;
  /* 青 */

  /* Type */
  --font: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans", Meiryo, sans-serif;

  /* Layout */
  --max-content: 920px;
  --page-gutter: clamp(16px, 4vw, 48px);
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 60px;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

iframe {
  width: 100%;
  max-width: 100%;
}

.section,
.page-head {
  overflow-wrap: anywhere;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font);
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 全体の配置 ---------- */

.app {
  min-height: 100vh;
}

/* ---------- 共通の横型ナビゲーション ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--accent-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.navbar-inner {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
}

.navbar-brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.navbar-logo {
  height: 36px;
  width: auto;
  display: block;
}

.navbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-inline-start: auto;
  gap: 4px;
}

.navbar-nav a {
  white-space: nowrap;
  display: block;
  padding: 8px 13px;
  font-size: 16px;
  color: var(--ink-soft);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.navbar-nav a:hover {
  color: var(--ink);
  font-weight: bold;
}

.navbar-nav a.is-current {
  color: var(--ink);
  font-weight: bold;
}

.navbar-nav a.nav-highlight {
  color: var(--accent);
  font-weight: 700;
}

/* Mobile hamburger button — hidden on desktop */
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 3px;
}

.menu-btn span,
.menu-btn::before,
.menu-btn::after {
  content: "";
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 99;
  max-height: calc(100vh - 60px);
  max-height: calc(100svh - 60px);
  overflow-y: auto;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

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

.mobile-nav a {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}

.mobile-nav a.nav-highlight {
  color: var(--accent);
  font-weight: 700;
}

/* Main column */
.main:not(.home-main),
.home-main>.section {
  width: min(var(--max-content), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}

.main {
  flex: 1;
  min-width: 0;
}

.page-head {
  padding-block: 40px 24px;
  border-bottom: 1px solid var(--line);
}

.page-head .eyebrow {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 6px;
  margin-top: 6px;
}

.page-head h1 {
  font-size: 30px;
}

.page-head p {
  color: var(--ink);
  margin-top: 10px;
  max-width: 200ch;
}

.section {
  padding-block: 40px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 20px;
  margin-bottom: 20px;
}

.section-lead {
  color: var(--ink);
  max-width: 200ch;
  margin: 10px 0 22px;
}

/* Research detail: align the heading, photo and text to one centered column. */
#detail-root>.page-head,
#detail-root>.section {
  padding-inline: max(0px, calc((100% - 800px) / 2));
  overflow-wrap: anywhere;
}

#detail-root .research-detail-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  border-radius: var(--radius-md);
}

#detail-root .research-detail-photo>img {
  object-position: center;
}

#detail-root .rich-content img {
  max-width: 100%;
  height: auto;
}

/* ---------- Photo placeholder ---------- */
.photo {
  position: relative;
  background:
    repeating-linear-gradient(135deg, #E9E6DD 0 2px, #F0EEE7 2px 14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* 画像が入ったときは全体を覆う */
.photo>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo .cap {
  position: relative;
  /* img の上に重ねる */
  z-index: 1;
  font-size: 11px;
  color: var(--ink-faint);
  background: rgba(245, 244, 240, 0.85);
  padding: 5px 9px;
  border-top: 1px solid var(--line);
  width: 100%;
}

/* ---------- トップのメインビジュアル ---------- */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--paper);
}

.hero-image {
  width: 100%;
  height: min(41.66vw, calc(100vh - 60px));
  height: min(41.66vw, calc(100svh - 60px));
  object-fit: cover;
  object-position: center;
  animation: hero-reveal 4s ease-out both;
}

.hero-copy {
  position: absolute;
  left: 5%;
  bottom: 2%;
  color: #082740;
  text-shadow: 0 2px 16px rgba(255, 255, 255, 0.7);
}

.hero-copy h1 {
  font-family: "Shippori Mincho", serif;
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.hero-copy p {
  margin: 12px 0 0;
  font-family: "Shippori Mincho", serif;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.08em;
}

@media (max-width: 680px) {
  .hero-copy {
    position: relative;
    left: auto;
    bottom: auto;
    padding: 20px 16px 26px;
    background: #f6f8f5;
  }
}

@media (min-width: 681px) and (max-height: 500px) {
  .hero-copy h1 {
    font-size: 8svh;
  }

  .hero-copy p {
    font-size: 3svh;
    margin-top: 6px;
  }
}

/* 拡大による端の見切れを避け、透明度だけを変える。 */
@keyframes hero-reveal {
  from {
    opacity: 0.75;
  }

  to {
    opacity: 1;
  }
}

.hero-overlay {
  position: relative;
  z-index: 2;
  padding: 60px 56px;
  max-width: 700px;
  background: linear-gradient(135deg,
      rgba(245, 244, 240, 0.95) 0%,
      rgba(245, 244, 240, 0.85) 60%,
      rgba(245, 244, 240, 0) 100%);
  border-radius: 0 var(--radius) 0 0;
}

.hero-overlay .kicker {
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

.hero-overlay h1 {
  font-size: 44px;
  margin-top: 14px;
  line-height: 1.25;
}

.hero-overlay .lede {
  margin-top: 16px;
  color: var(--ink-soft);
  max-width: 40ch;
}

.hero-overlay .actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--ink);
}

.btn.primary {
  background: var(--ink);
  color: var(--paper);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn.accent {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Gallery (masonry-ish) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery.gallery-four {
  grid-template-columns: repeat(2 minmax(0, 1fr));
}

.gallery .photo:nth-child(1) {
  height: 150px;
}

.gallery .photo:nth-child(2) {
  height: 220px;
  grid-row: span 2;
}

.gallery .photo:nth-child(3) {
  height: 120px;
}

.gallery .photo:nth-child(4) {
  height: 190px;
}

.gallery .photo:nth-child(5) {
  height: 150px;
}

.gallery .photo:nth-child(6) {
  height: 90px;
}

/* ---------- 研究一覧カード ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 20px;
}

.research-page-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 20px
}

.research-card {
  display: block;
}

.research-card .photo {
  aspect-ratio: 3 / 2;
  height: auto;
}

/* two-col 内のカード（about.html）は幅が広いので 16:9 に抑える */
.two-col .research-card .photo {
  aspect-ratio: 16 / 9;
}

.research-card .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--ink);
}

.research-card .tag.interface {
  background: var(--blue-soft);
  color: #03637a;
}

.research-card .tag.robotics {
  background: var(--accent-soft);
  color: #3b2f6b;
}

.research-card h3 {
  font-size: 18px;
  margin-top: 8px;
}

.research-card p {
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.research-card .yr {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 3px;
}

.research-card:nth-child(2) {
  transform: translateY(22px);
}

.research-card:nth-child(4) {
  transform: translateY(22px);
}

.research-card:nth-child(6) {
  transform: translateY(22px);
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-row button {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.filter-row button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- ニュース一覧 ---------- */
.news-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

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

.news-item .photo {
  width: 84px;
  height: 64px;
  flex-shrink: 0;
}

.news-item .meta {
  font-size: 11.5px;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.news-item .cat {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--blue-soft);
}

.news-item .cat.entry {
  background: var(--accent-soft);
  color: #3b2f6b;
}

.news-item h3 {
  font-size: 15px;
  margin-top: 5px;
  font-weight: 700;
  font-family: var(--font-body);
}

.news-item p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 4px 0 0;
}

/* ---------- メンバー一覧 ---------- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.member-card {
  text-align: center;
}

.member-card .photo {
  aspect-ratio: auto;
  height: auto;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.member-card .name {
  font-size: 12.5px;
  margin-top: 8px;
  font-weight: 700;
}

.member-card .role {
  font-size: 11px;
  color: var(--ink-faint);
}

/* ---------- CTA banner ---------- */
.cta-band {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-band h3 {
  font-size: 17px;
  color: #3B2F6B;
}

.cta-band p {
  margin: 5px 0 0;
  color: #3B2F6B;
  font-size: 13.5px;
}

/* ---------- 2列の本文配置 ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.two-col>*,
.research-grid>*,
.news-item>* {
  min-width: 0;
}

/* ---------- Table-ish list ---------- */
.def-list dt {
  font-size: 20px;
  color: var(--ink-faint);
  margin-top: 14px;
}

.def-list dd {
  margin: 3px 0 0;
  font-size: 16px;
  padding-left: 10px
}

.def-list ul li {
  margin: 5px 0 0;
  font-size: 16px;
  padding-left: 10px
}

/* ---------- 共通フッター ---------- */
.site-footer {
  padding: 26px 44px 40px;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery,
  .gallery.gallery-four {
    grid-template-columns: repeat(2, 1fr);
  }

  .member-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .student-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .menu-btn {
    display: flex;
  }
}

@media (min-width: 769px) {
  .mobile-nav.is-open {
    display: none;
  }
}

@media (max-width: 680px) {
  .navbar-inner {
    padding-inline: 20px;
  }

  .page-head {
    padding-block: 26px 18px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .section {
    padding-block: 26px;
  }


  .hero-overlay {
    padding: 32px 20px;
  }

  .hero-overlay h1 {
    font-size: 28px;
  }

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

  .research-card:nth-child(2),
  .research-card:nth-child(5),
  .research-card:nth-child(8) {
    transform: none;
  }

  .research-card .photo {
    aspect-ratio: 3 / 2;
    height: auto;
  }

  .gallery,
  .gallery.gallery-four {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery .photo {
    height: 110px !important;
    grid-row: auto !important;
  }

  .member-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-item .photo {
    width: 64px;
    height: 50px;
  }

  .site-footer {
    padding: 20px;
  }
}

/* ---------- 研究室説明会 ---------- */
.lab-briefing-venue {
  display: inline-flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  /*background: var(--accent-soft);*/
  color: var(--ink);
}

.lab-briefing-dates {
  display: grid;
  gap: 0.5rem;
  max-width: 32rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.lab-briefing-dates li {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ---------- 年間スケジュール ---------- */
.annual-schedule .section-lead {
  margin-bottom: 28px;
}

.schedule-scroll {
  overflow-x: auto;
  max-width: 1280px;
}

.schedule-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14px;
}

.schedule-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.schedule-name {
  width: 310px;
}

.schedule-date {
  width: 80px;
}

.schedule-table th,
.schedule-table td {
  height: 44px;
}

.schedule-table thead th {
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.schedule-table thead th span {
  margin-left: 2px;
  font-size: 10px;
  color: var(--ink-faint);
}

.schedule-table tr>th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper);
  text-align: left;
}

.schedule-table tbody th[scope="row"] {
  padding: 10px 24px 10px 0;
  font-weight: 400;
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}

.schedule-table .schedule-group th {
  height: 58px;
  padding: 24px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.schedule-date-cell {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.schedule-month {
  position: relative;
  padding: 0;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.schedule-month:last-child {
  border-right: 1px solid var(--line);
}

.schedule-month.is-scheduled::after {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  left: -1px;
  right: 0;
  height: 8px;
  background: var(--accent);
}

.schedule-month.is-start::after {
  left: 8px;
  border-radius: 2px 0 0 2px;
}

.schedule-month.is-end::after {
  right: 8px;
  border-radius: 0 2px 2px 0;
}

.schedule-month.is-start.is-end::after {
  border-radius: 2px;
}

.schedule-scroll-note {
  display: none;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

@media (max-width: 1020px) {
  .schedule-scroll-note {
    display: block;
  }
}

@media (max-width: 680px) {
  .schedule-name {
    width: 188px;
  }

  .schedule-date {
    width: 68px;
  }

  .schedule-table {
    min-width: 800px;
    font-size: 12px;
  }

  .schedule-table tbody th[scope="row"] {
    padding-right: 16px;
  }
}

/* ---------- 教員の経歴 ---------- */
.career {
  max-width: 1500px;
}

.career-group+.career-group {
  margin-top: 40px;
}

.career-group h3 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 16px;
  margin-left: 20px
}

.career-group h3 span {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 12px;
}

.career-list {
  margin: 0;
}

.career-entry {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.career-entry dt {
  font-size: 14px;
  font-weight: 700;
  margin-left: 30px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.career-entry dd {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.career-entry li+li {
  margin-top: 8px;
}

.career-entry li {
  padding-left: 16px;
  position: relative;
}

.career-entry li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}

.graduate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  max-width: 1000px;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  max-width: 1000px;
}

.alumni-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  max-width: 1000px;
}

.student-entry {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.student-entry .name {
  font-size: 16px;
  font-weight: 600;
}

.student-entry .role {
  font-size: 13px;
  color: var(--accent);
}

@media (max-width: 680px) {
  .career-entry {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 0;
  }

  .career-group h3 span {
    display: block;
    margin: 4px 0 0;
  }

  .student-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 大学・所属情報 ---------- */
.navbar-inner {
  gap: 20px;
}

.navbar-brands {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.university-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: #fff;
  flex-shrink: 0;
}

.university-symbol {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.university-name {
  width: 97px;
  height: auto;
}

.navbar-brand {
  border-left: 1px solid var(--line-strong);
  padding-left: 18px;
}

.navbar-nav a {
  white-space: nowrap;
  padding-inline: 10px;
}

.menu-btn {
  flex-shrink: 0;
}

.site-footer {
  background: var(--accent-soft);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-footer .university-symbol {
  width: 46px;
  height: 46px;
}

.site-footer .university-name {
  width: 131px;
}

.footer-lab {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.footer-lab span {
  margin-left: 8px;
}

.footer-affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 12px;
  font-size: 14px;
}

.footer-affiliation {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-copyright {
  margin: 12px 0 0;
}

.affiliations {
  scroll-margin-top: 80px;
}

.affiliation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.affiliation-list li {
  display: flex;
}

.affiliation-list a {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}

.affiliation-list a:hover {
  background: var(--accent-soft);
}

.affiliation-level {
  font-size: 12px;
  color: var(--ink-soft);
}

.affiliation-name {
  margin: 10px 0 20px;
  font-size: 18px;
  font-weight: 600;
}

.affiliation-link {
  margin-top: auto;
  font-size: 13px;
  color: var(--accent);
}

@media (max-width: 680px) {
  .navbar-inner {
    padding-inline: 12px;
    gap: 10px;
  }

  .navbar-brands {
    gap: 10px;
  }

  .navbar-brand {
    padding-left: 10px;
  }

  .navbar-logo {
    height: 28px;
  }

  .university-brand {
    gap: 5px;
    padding: 3px;
  }

  .university-symbol {
    width: 27px;
    height: 27px;
  }

  .university-name {
    width: 77px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .affiliation-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ---------- 教員の写真 ---------- */
.faculty-portrait {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 101 / 127;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.faculty-profile {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  max-width: 760px;
}

.faculty-profile-info p {
  margin: 8px 0 0;
}

.faculty-profile-info .faculty-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 120px);
  gap: 24px;
}

@media (max-width: 480px) {
  .faculty-profile {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Keep page links visible on desktop, including smaller laptop windows. */
@media (min-width: 769px) and (max-width: 1100px) {
  body {
    padding-top: 104px;
  }

  .navbar-inner {
    height: 104px;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 4px;
    padding-inline: 16px;
  }

  .navbar-brands {
    justify-content: center;
    width: 100%;
  }

  .navbar-nav {
    width: 100%;
    gap: 2px;
  }

  .navbar-nav a {
    padding: 6px 9px;
    font-size: 14px;
  }

  .affiliations {
    scroll-margin-top: 124px;
  }
}

.footer-access {
  margin: 12px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.footer-access a {
  text-decoration: underline;
}

#access,
#contact {
  scroll-margin-top: 100px;
}

.hero-image {
  display: block;
}

.hero-playback {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .hero-image {
    animation: none;
  }
}

/* Language navigation stays visible when the primary menu collapses. */
.language-switch {
  flex-shrink: 0;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}

.translation-note {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 0 24px;
  color: var(--ink-soft);
  font-size: 14px;
}

html[lang="en"] .hero-copy h1 {
  letter-spacing: 0;
}

html[lang="en"] .tag {
  white-space: normal;
}

html[lang="en"] .schedule-name {
  width: 280px;
}

html[lang="en"] .schedule-date {
  width: 100px;
}

html[lang="en"] .footer-lab {
  overflow-wrap: anywhere;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .navbar-inner {
    position: relative;
  }

  .language-switch {
    position: absolute;
    top: 12px;
    right: 16px;
  }
}

@media (min-width: 1101px) and (max-width: 1350px) {
  .navbar-inner {
    gap: 10px;
    padding-inline: 16px;
  }

  html[lang="en"] .navbar-nav {
    gap: 0;
  }

  html[lang="en"] .navbar-nav a {
    padding-inline: 7px;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .navbar-brands {
    gap: 5px;
    min-width: 0;
    flex-shrink: 1;
  }

  .navbar-brand {
    padding-left: 5px;
    min-width: 0;
    flex-shrink: 1;
  }

  .navbar-logo {
    max-width: 100%;
    height: auto;
    max-height: 28px;
  }

  .language-switch {
    padding: 6px;
  }
}