/* ===================================================
   Smart Systems Laboratory - ss-lab.css
   Clean academic design inspired by banno-lab.net
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300&display=swap');

/* --- Reset & Base --------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #1a2744;
  --blue:   #2563a8;
  --accent: #c8913a;
  --light:  #f5f6f8;
  --gray:   #6b7280;
  --border: #dde2ea;
  --white:  #ffffff;
  --text:   #1f2937;
  --max-w:  960px;
  --font-ja: 'Noto Sans JP', sans-serif;
  --font-en: 'Source Serif 4', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ja);
  color: var(--text);
  background: var(--white);
  font-size: 15px;
  line-height: 1.8;
}

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

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

/* --- Layout --------------------------------------- */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

main {
  flex: 1;
  padding: 48px 0 80px;
}

/* --- Global navigation bar (below hero) ----------- */
.menu-bar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

.menu-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-title {
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .02em;
}

.site-title-sub {
  font-size: 11px;
  font-weight: 300;
  opacity: .8;
}

.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; opacity: .85; }

/* desktop nav */
nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2px;
}

nav.main-nav a {
  color: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  background: rgba(255,255,255,.15);
  color: var(--white);
  text-decoration: none;
}

/* lang toggle */
.lang-toggle {
  margin-left: 16px;
}

.hero-controls .lang-toggle { margin-left: 0; }

.lang-toggle a {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.3);
  padding: 3px 8px;
  border-radius: 3px;
  transition: all .15s;
  font-family: var(--font-en);
  letter-spacing: .05em;
}

.lang-toggle a:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
  text-decoration: none;
}

/* hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: all .2s;
}

/* mobile drawer */
.mobile-nav {
  display: none;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.1);
}

.mobile-nav.open { display: block; }

.mobile-nav ul {
  list-style: none;
  padding: 8px 0 16px;
}

.mobile-nav li a {
  display: block;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  padding: 10px 24px;
}

.mobile-nav li a:hover {
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

/* --- Hero banner ---------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2c4a82 100%);
  color: var(--white);
  padding: 52px 24px 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.hero .subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  letter-spacing: .03em;
}

/* --- Page heading --------------------------------- */
.page-heading {
  border-bottom: 2px solid var(--navy);
  padding-bottom: 12px;
  margin-bottom: 32px;
}

.page-heading h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

/* --- Section heading ------------------------------ */
h2.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 40px 0 16px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

h3.sub-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin: 28px 0 10px;
}

/* --- Home page ------------------------------------ */
.home-hero-copy {
  margin: 8px 0 18px;
}

.home-headline {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .01em;
}

.home-lead {
  margin-top: 10px;
  font-size: 15px;
  color: var(--text);
  max-width: 820px;
}

.cta-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover {
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--blue);
  color: var(--white);
  border-color: rgba(255,255,255,.0);
}

.btn.primary:hover {
  box-shadow: 0 10px 22px rgba(37,99,168,.22);
}

.pillars {
  margin: 18px 0 26px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pillar-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: var(--light);
  color: inherit;
  text-decoration: none;
}

.pillar-card:hover {
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.pillar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.pillar-desc {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(31,41,55,.88);
}

.home-intro {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 40px;
  max-width: 760px;
}

@media (max-width: 720px) {
  .home-headline { font-size: 20px; }
  .pillar-grid { grid-template-columns: 1fr; }
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 32px;
}

.kw-tag {
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* --- News table (banno-lab style) ----------------- */
.news-section {
  margin-top: 8px;
}

.news-table {
  width: 100%;
  border-collapse: collapse;
}

.news-table tr {
  border-bottom: 1px solid var(--border);
}

.news-table tr:first-child {
  border-top: 1px solid var(--border);
}

.news-table td {
  padding: 12px 8px;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.7;
}

.news-table td.date {
  white-space: nowrap;
  color: var(--gray);
  font-size: 13px;
  width: 100px;
  padding-right: 16px;
  font-family: var(--font-en);
}

.news-table td.content a {
  color: var(--blue);
}

.news-more {
  text-align: right;
  margin-top: 12px;
}

.news-more a {
  font-size: 13px;
  color: var(--blue);
}

/* --- Research page -------------------------------- */
.research-item {
  margin-bottom: 48px;
}

.research-item .research-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 24px;
  align-items: start;
  margin-top: 12px;
}

.research-item p {
  font-size: 14px;
  line-height: 1.9;
  color: #374151;
}

.research-item .research-img img {
  border-radius: 6px;
  width: 100%;
}

.kw-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 14px;
}

.kw-list {
  font-size: 13px;
  color: var(--navy);
  margin-top: 4px;
}

/* --- People page ---------------------------------- */
.staff-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--light);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.staff-card img {
  border-radius: 6px;
  width: 100%;
}

.staff-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  font-family: var(--font-en);
  margin-bottom: 4px;
}

.staff-title {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
}

.staff-email {
  font-size: 13px;
  color: var(--gray);
  font-family: var(--font-en);
}

.students-note {
  font-size: 14px;
  color: var(--gray);
  background: var(--light);
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 8px;
}

/* --- Publications --------------------------------- */
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.pub-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  color: var(--white) !important;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background .15s;
  text-decoration: none !important;
}

.pub-link-btn:hover {
  background: var(--blue);
}

/* --- Access / Map --------------------------------- */
.access-info p {
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 6px;
}

.map-wrap {
  margin-top: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-wrap iframe {
  width: 100%;
  height: 420px;
  display: block;
  border: 0;
}

/* --- Links page ----------------------------------- */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-list li a {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.link-list li a::before {
  content: '→';
  color: var(--accent);
  font-size: 13px;
}

/* --- Footer --------------------------------------- */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 28px 24px;
  font-size: 12px;
  text-align: center;
  line-height: 2;
}

footer a { color: rgba(255,255,255,.7); }
footer a:hover { color: var(--white); }

/* --- Responsive ----------------------------------- */
@media (max-width: 768px) {
  nav.main-nav { display: none; }
  .hamburger { display: flex; }

  .research-item .research-body {
    grid-template-columns: 1fr;
  }

  .research-item .research-img {
    max-width: 80%;;
    max-width: none;
  }

  .staff-card {
    grid-template-columns: 140px 1fr;
  }
}

@media (max-width: 480px) {
  .staff-card {
    grid-template-columns: 1fr;
  }

  .news-table td.date {
    width: 72px;
  }
}

/* --- Site Hero (全ページ共通) ---------------------- */
.site-hero {
  position: relative;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  display: block;
}

.site-hero img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

/* top-right controls on hero */
.hero-controls {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* centered band overlay (reference-like) */
.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 40, 60, .62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: 18px 0;
  z-index: 4;
}

.hero-band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  color: var(--white);
}

.hero-left-ja {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: .03em;
  line-height: 1.25;
}

.hero-left-en {
  margin-top: 6px;
  font-size: 11px;
  opacity: .85;
  line-height: 1.35;
}

.hero-right-ja {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.hero-right-en {
  margin-top: 6px;
  font-size: 20px;
  font-style: italic;
  opacity: .9;
  font-family: var(--font-en);
}

@media (max-width: 600px) {
  .site-hero img { height: 220px; }
  .site-hero { max-height: 220px; }
  .hero-controls { top: 10px; right: 12px; }
  .hero-band { padding: 12px 0; }
  .hero-band-inner { grid-template-columns: 1fr; gap: 10px; }
  .hero-left-ja { font-size: 18px; }
  .hero-right-ja { font-size: 22px; }
  .hero-right-en { font-size: 14px; }
}


/* EN tone unification helpers */
.lead{max-width: 70ch; font-size: 1.05rem; line-height: 1.6; opacity: 0.95;}
.about{max-width: 75ch;}

.research-item .research-body {
  display: block;
  margin-top: 12px;
}

.research-item .research-img {
  margin: 24px auto 0;     /* ← 中央寄せ */
  text-align: center;
}

.research-item .research-img img {
  width: 80%;              /* ← ここがポイント */
  max-width: 760px;        /* ← 上限 */
  height: auto;
  display: inline-block;
  border-radius: 6px;
}


