/* 伊藤孝行研究室 Web サイト 共通スタイル */

:root {
  --navy: #14325a;
  --navy-dark: #0d2140;
  --accent: #c0392b;
  --text: #222;
  --muted: #5f6b7a;
  --line: #e1e5ea;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --max: 1100px;
  --radius: 8px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; color: var(--navy-dark); font-weight: 700; }
h2 { font-size: 1.6rem; padding-bottom: .35em; border-bottom: 2px solid var(--navy); margin-top: 0; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
h4 { font-size: 1.05rem; margin-top: 1.4em; color: var(--navy); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
small, .muted { color: var(--muted); }

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

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; white-space: nowrap; }
.brand small { display: block; font-size: .72rem; font-weight: 400; color: #c9d4e3; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.5); color: #fff;
  border-radius: 6px; padding: 6px 10px; font-size: 1rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav a {
  display: block; padding: 18px 12px; color: #e8eef6; font-size: .92rem; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.site-nav a.active { color: #fff; border-bottom-color: #fff; }
.site-nav a.ext::after { content: " \2197"; font-size: .8em; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; padding-bottom: 8px; }
  .site-nav a { padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-nav a.active { border-bottom-color: rgba(255,255,255,.12); font-weight: 700; }
  .brand { white-space: normal; font-size: 1rem; }
  .brand small { font-size: .68rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  background: var(--navy-dark) center 30% / cover no-repeat;
  min-height: 420px; display: flex; align-items: center; justify-content: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,25,50,.35), rgba(10,25,50,.65)); }
.hero .wrap { position: relative; padding: 60px 20px; }
.hero .kicker { font-size: .95rem; letter-spacing: .06em; margin-bottom: .6em; color: #e6ecf5; }
.hero h1 { color: #fff; font-size: 2.6rem; margin: 0 0 .3em; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero .sub { font-size: 1.05rem; color: #e6ecf5; margin: 0; }
.hero.small { min-height: 220px; }
.hero.small h1 { font-size: 2rem; }
@media (max-width: 700px) {
  .hero { min-height: 300px; }
  .hero h1 { font-size: 1.8rem; }
  .hero.small h1 { font-size: 1.5rem; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-soft); }
.section .lead { font-size: 1.05rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Members ---------- */
.member-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px;
  list-style: none; padding: 0; margin: 0 0 28px;
}
.member-grid.staff { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.member { text-align: center; }
.member .photo {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;
  border-radius: var(--radius); background: #dfe4ea; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.member .name { display: block; margin-top: .55em; font-weight: 700; font-size: .98rem; color: var(--navy-dark); }
.member .role { display: block; font-size: .85rem; color: var(--muted); }
.member .alt { display: block; font-size: .82rem; color: var(--muted); margin-top: -.1em; }
.member a.name:hover { text-decoration: underline; }

.cohort { margin-top: 1.2em; }
.cohort h3 { border-left: 5px solid var(--navy); padding-left: .6em; margin-bottom: .9em; }

/* ---------- Research topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.topic {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy);
  border-radius: var(--radius); padding: 20px 22px;
}
.topic h3 { margin: 0 0 .5em; font-size: 1.08rem; }
.topic p { margin: 0; font-size: .95rem; }

/* ---------- Video ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-single { max-width: 720px; }
.caption { font-size: .92rem; color: var(--muted); margin-top: .6em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-grid address { font-style: normal; line-height: 1.9; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.project { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 20px; }
.project .badge {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--navy); border-radius: 4px; padding: 2px 10px; margin-bottom: .6em;
}
.project h3 { margin: 0 0 .4em; font-size: 1.15rem; }
.project dl { margin: 0; }
.project dt { font-weight: 700; color: var(--navy); margin-top: .6em; font-size: .92rem; }
.project dd { margin: 0; }
.project .links { margin-top: .8em; font-size: .92rem; }

/* ---------- Theses ---------- */
.thesis-year h3 { border-left: 5px solid var(--navy); padding-left: .6em; }
.thesis-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.thesis-list li { padding: 8px 0 8px 1em; border-bottom: 1px solid var(--line); text-indent: -1em; }
.thesis-list li .author { font-weight: 700; margin-right: .6em; }
.thesis-list li .note { color: var(--muted); font-size: .9rem; }

/* ---------- Lectures ---------- */
.lecture {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 24px;
}
.lecture.no-photo { grid-template-columns: 1fr; }
.lecture .photo img { width: 100%; border-radius: var(--radius); }
.lecture .photo img + img { margin-top: 12px; }
.lecture h3 { margin: 0 0 .6em; font-size: 1.2rem; }
.lecture .tag { display: inline-block; font-size: .78rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 8px; margin-bottom: .6em; }
.lecture dl { margin: 0; }
.lecture dt { font-weight: 700; color: var(--navy); margin-top: .7em; font-size: .9rem; }
.lecture dd { margin: 0; }
.lecture dd p { margin: 0 0 .6em; }
.lecture details { margin-top: .7em; }
.lecture summary { cursor: pointer; color: var(--navy); font-weight: 700; font-size: .92rem; }
.lecture details p { margin: .5em 0 0; font-size: .95rem; }
@media (max-width: 640px) {
  .lecture { grid-template-columns: 1fr; }
  .lecture .photo img { max-width: 200px; }
}

/* ---------- Research students ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { position: relative; padding-left: 2.6em; margin-bottom: 1.4em; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: .1em; width: 1.9em; height: 1.9em; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.steps h3 { margin: 0 0 .4em; font-size: 1.15rem; }
.steps h4 { margin: .9em 0 .2em; }
.steps .en { color: var(--muted); font-size: .93rem; }

/* ---------- Alumni ---------- */
.alumni-text h3 { border-left: 5px solid var(--navy); padding-left: .6em; margin-top: 1.8em; }
.alumni-text h4 { margin: 1em 0 .3em; color: var(--navy); }
.alumni-text ul { list-style: none; padding: 0; margin: 0 0 .6em; columns: 2; column-gap: 32px; }
.alumni-text ul li { break-inside: avoid; padding: 2px 0; }
@media (max-width: 640px) { .alumni-text ul { columns: 1; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #c9d4e3; padding: 36px 0 28px; font-size: .9rem; margin-top: 40px; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer .copy { width: 100%; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; margin-top: 8px; font-size: .82rem; color: #97a6ba; }

.totop { text-align: right; margin-top: 12px; font-size: .9rem; }

/* ---------- News ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.news-list time { color: var(--muted); font-size: .92rem; white-space: nowrap; padding-top: .1em; }
.news-list .news-body h3 { margin: 0 0 .4em; font-size: 1.1rem; }
.news-list .news-body p { margin: 0 0 .6em; }
.news-list .news-photo { max-width: 480px; border-radius: var(--radius); margin: .4em 0 .8em; }
.more { text-align: right; margin: 14px 0 0; font-size: .95rem; }
@media (max-width: 600px) { .news-list li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Member photo placeholder ---------- */
.member .photo.placeholder { display: block; background: linear-gradient(160deg, #dfe4ea, #c9d2dc); }
