/* =========================
   Tunnel & Structural Lab
   Clean unified style.css
   ========================= */

:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --surface2:#f1f5f9;
  --text:#0f172a;
  --muted:#475569;
  --accent:#2563eb;
  --border:rgba(15,23,42,.10);
  --shadow:0 12px 30px rgba(15,23,42,.08);
  --radius:18px;

  --maxw:1120px;
  --maxw-wide:1200px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
          "Liberation Mono","Courier New", monospace;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP",
               "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: linear-gradient(180deg, #ffffff, var(--bg) 40%);
  color: var(--text);
  line-height: 1.75;
}

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

/* ===== Layout ===== */
.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}
.container.wide{ max-width: var(--maxw-wide); }

.section{ padding: 26px 0; }

.lead{ color: var(--muted); margin: 6px 0 0; }
.small{ color: var(--muted); font-size: 12.5px; }

/* ===== Header ===== */
header.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 0;
}

/* Brand (logo + 3 lines) */
.brand{
  display:flex;
  align-items:center;
  gap: 14px;
}

.brand img{
  height: 52px;   /* ← ロゴ高さ（ここだけで統一） */
  width: auto;
  display:block;
}

.brand > div{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.brand .title{
  font-weight: 750;
  letter-spacing: .2px;
  color: var(--text);
  line-height: 1.15;
  margin: 0;
  font-size: 18px;
}

.title-en{
  font-size: 12px;
  color: #64748b;
  letter-spacing: .3px;
  line-height: 1.15;
  margin: 2px 0 0;
}

.brand .sub{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.15;
  margin: 2px 0 0;
}

/* Nav */
.nav-links{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.nav-links a{
  display:inline-flex;
  align-items:center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text);
}

.nav-links a:hover{
  border-color: var(--border);
  background: rgba(37,99,235,.06);
  text-decoration:none;
}

.nav-links a.active{
  border-color: rgba(37,99,235,.25);
  background: rgba(37,99,235,.10);
  color: var(--text);
}

/* Mobile */
.mobile-toggle{
  display:none;
  border:1px solid var(--border);
  background: rgba(15,23,42,.03);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
}

@media (max-width: 860px){
  .mobile-toggle{ display:inline-flex; }
  .nav-links{ display:none; width:100%; padding: 8px 0 12px; }
  .nav-links.open{ display:flex; justify-content:flex-start; }
  .navbar{ flex-wrap:wrap; }
  .brand img{ height: 46px; } /* モバイルは少し小さく */
}

/* ===== Components ===== */
.card{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.grid{
  display:grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.table{
  width:100%;
  border-collapse: collapse;
}
.table th,
.table td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align:left;
}
.table th{
  color: var(--muted);
  font-weight: 750;
  width: 120px;
}

/* ===== Hero ===== */
.hero{ padding: 34px 0 18px; }

.hero-card{
  border: 1px solid var(--border);
  background:
    radial-gradient(1200px 700px at 0% 0%, rgba(37,99,235,.10), transparent 45%),
    radial-gradient(900px 600px at 100% 0%, rgba(16,185,129,.08), transparent 55%),
    var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* 左寄せのまま“寄りすぎない” */
.hero-inner{
  padding: 32px 26px;
  max-width: 980px;
  margin: 0;
}

.hero h1{
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.2px;
}

.hero p{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

/* English block (optional) */
.en{
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

/* Hero slideshow */
.hero-slideshow{
  margin: 20px 0 24px;
  max-width: 500px; /* 画像が大きすぎる場合はここで調整 */
}

.hero-slideshow img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 35px rgba(15,23,42,.12);
  opacity: 1;
  transition: opacity .6s ease;
}

/* ===== Faculty profile (members) ===== */
.prof2{ padding: 18px; }

.prof2-photo{
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.03);
  margin: 8px 0 14px;
}

.prof2-main{
  font-size: 20px;
  font-weight: 750;
  margin: 22px 0 12px;
  letter-spacing: -.2px;
}

.prof2-sub{
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 0 6px;
}

.prof2-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
}
.prof2-list li{ margin: 6px 0; }

.prof2-term{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-right: 8px;
  white-space: nowrap;
}

@media (max-width: 600px){
  .prof2-photo{ width: 200px; }
  .prof2-term{ white-space: normal; }
}

/* ===== Indent: keep headings aligned, indent only contents ===== */
.indent-content{ margin-left: 40px; }
@media (max-width: 768px){
  .indent-content{ margin-left: 20px; }
}
.brand{
  text-decoration: none;
}

.brand:hover{
  text-decoration: none;
}

.brand{
  transition: opacity .2s ease;
}

.brand:hover{
  opacity: .60;
}

.annual-schedule {
  margin-top: 60px;
}

.annual-schedule h2 {
  text-align: center;
  margin-bottom: 40px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.month {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.month h3 {
  margin-top: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.month ul {
  padding-left: 18px;
  margin: 0;
}

.month li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* 年間スケジュール */
.annual-schedule .muted{
  color: var(--muted);
  margin-top: -10px;
  margin-bottom: 18px;
  font-size: .95rem;
}

.schedule-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.month{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
}

.month h3{
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1.05rem;
}

.month ul{
  margin: 0;
  padding-left: 18px;
}

.month li{
  margin: 0 0 6px;
  line-height: 1.55;
  color: var(--muted);
}

.month li:last-child{
  margin-bottom: 0;
}

/* 研究テーマは2列レイアウトにする */
.research-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* タブレット以下は1列 */
@media (max-width: 900px){
  .research-grid{
    grid-template-columns: 1fr;
  }
}

.pub-list{
  margin: 10px 0 30px;
  padding-left: 18px;
  line-height: 1.7;
}

.pub-list li{
  margin-bottom: 18px;
}

.pub-list strong{
  font-size: 1.05rem;
}

.pub-list em{
  font-style: italic;
  color: var(--muted);
}
.btn-map{
  display:inline-block;
  padding:10px 16px;
  border-radius:8px;
  background: var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:600;
  transition:.2s ease;
}

.btn-map:hover{
  opacity:.85;
}
.annual-schedule h2{
  text-align: left;
}

.nav-links a{
  display:flex;
  flex-direction:column;
  align-items:center;
  line-height:1.2;
}

.nav-ja{
  font-weight:600;
}

.nav-en{
  font-size:11px;
  letter-spacing:.5px;
  color: var(--muted);
  margin-top:2px;
}
.nav-links a{
  display:flex;
  flex-direction:column;
  align-items:center;
  line-height:1.15;
}

.nav-ja{ font-weight:600; }

.nav-en{
  font-size:11px;
  letter-spacing:.4px;
  color: var(--muted);
  margin-top:2px;
}
.nav-links a{
  white-space: nowrap;
}
.nav-links{
  display:flex;
  gap:28px;
  align-items:flex-start;
}
.nav-links a{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-decoration:none;
  white-space:nowrap;   /* ← これが重要 */
}
/* ===== Nav: 1行固定 + 2段表示（JA/EN） ===== */
.nav-links{
  display:flex;
  flex-wrap: nowrap;          /* ここが重要：折り返し禁止 */
  gap: 18px;                  /* 28pxだと詰みやすいので少し詰める */
  align-items: center;
}

.nav-links a{
  display:flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;           /* 余白を少し減らして横幅節約 */
  border-radius: 999px;
  white-space: nowrap;        /* 「同窓会（土竜会）」を1行固定 */
  line-height: 1.15;
}
/* ナビは1行固定（折返し禁止）＋少し詰める */
.nav-links{
  flex-wrap: nowrap;
  gap: 16px;
}

.nav-links a{
  padding: 6px 8px;
  white-space: nowrap;
}

.nav-ja{ font-size: 14px; }
.nav-en{ font-size: 10.5px; }

/* ===== Password overlay: 透け防止（完全不透明） ===== */
.pw-overlay,
.password-overlay,
.password-modal,
#passwordOverlay,
#pwOverlay{
  position: fixed;
  inset: 0;
  background: #ffffff; /* ←完全不透明 */
  opacity: 1 !important;
  backdrop-filter: none !important;
  z-index: 9999;
}

/* オーバーレイ内のカード（入力枠） */
.pw-overlay .card,
.password-overlay .card,
.password-modal .card{
  background: #ffffff;
}

/* Facebook埋め込みを常に横幅いっぱいに */
.fb-page,
.fb-page iframe {
  width: 100% !important;
  max-width: 100%;
}
/* Facebook埋め込み：親の幅を100%にして細くならないようにする */
.fb-embed{
  width: 100%;
  max-width: 100%;
}

/* 念のため iframe も横幅いっぱいに */
.fb-embed iframe{
  width: 100% !important;
}
.fb-embed{
  width: 100%;
  max-width: 100%;
}

.fb-embed iframe{
  width: 100% !important;
}
