@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Raleway:wght@700&display=swap');

/* =========================
   Base
   ========================= */
body{
  margin:0;
  padding:0;
  font-family:'Montserrat',sans-serif;
  background:#ffffff;
  color:#374151;
}

/* =========================
   Hero / Header
   ========================= */
.title-header{
  position:relative;
  height:280px; /* compact */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  overflow:hidden;
  background:#0f172a;
}

@media (max-width: 900px){
  .title-header{ height:250px; }
}
@media (max-width: 640px){
  .title-header{ height:220px; }
}

.hero-slideshow .slideshow{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:hidden;
  z-index:0;
}

.hero-slideshow .slideshow img{
  position:absolute;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:saturate(90%) contrast(92%) brightness(82%) blur(6px);
  transform:scale(1.05);
  transition:opacity 1s ease-in-out;
  opacity:0;
}
.hero-slideshow .slideshow img.active{
  opacity:1;
}

/* fog overlay */
.top-nav{
  --navH:56px;
}
.fog-layer{
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:var(--navH);
  pointer-events:none;
  z-index:1;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(255,255,255,0.55), rgba(255,255,255,0.25) 40%, rgba(255,255,255,0.10) 60%, transparent 80%),
    radial-gradient(100% 50% at 20% 10%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(100% 50% at 80% 0%, rgba(255,255,255,0.2), transparent 60%);
  backdrop-filter: blur(2.5px);
}

/* waveform */
.waveform-container{
  position:relative;
  width:100%;
  height:170px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding-top:12px;
  z-index:2;
}
#waveform{
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  height:80px;
  z-index:2;
}
#waveform canvas{
  filter:brightness(1.2);
  background:transparent;
}
.waveform path{
  stroke:#ffffff !important;
}

/* title block */
.lab-title{
  position:relative;
  z-index:3;
  text-align:center;
}
.lab-title.left{
  text-align:left;
  width:100%;
  max-width:1100px;
  margin-left:1.25rem;
  position:relative;
}
.title-group{
  display:flex;
  align-items:baseline;
  gap:12px;
}
@media (max-width:640px){
  .title-group{
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
  }
}

.lab-note{
  font-size:1rem;
  color:#f8fafc;
  opacity:0.85;
  font-weight:500;
  letter-spacing:0.03em;
}

.lab-title h1{
  margin:0;
  font-family:'Raleway',sans-serif;
  font-weight:700;
  color:#f8fafc;
  text-shadow:0 2px 12px rgba(0,0,0,0.35);
  font-size:clamp(40px, 9vw, 72px);
}
.lab-title .highlight-ii{
  color:#93c5fd;
  font-weight:800;
}
.lab-title .lab-part{
  font-family:'Raleway',sans-serif;
  font-weight:600;
  font-size:0.9em;
  color:#f8fafc;
}
.subtitle{
  margin-top:0.25rem;
  font-size:1rem;
  font-style:italic;
  color:#bfdbfe;
}

/* slightly move up (optional) */
.title-header .lab-title{
  position:relative;
  top:-20px;
}
.title-header .subtitle{
  position:relative;
  top:-14px;
}

/* =========================
   Top Nav
   ========================= */
.top-nav{
  position:sticky;
  top:0;
  z-index:5;
}

.top-nav .menu-links{
  display:flex;
  align-items:center;
  gap:1.25rem;
  flex-wrap:nowrap;
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:0 2.5rem;
}

.top-nav a{
  display:inline-flex;
  align-items:center;
  line-height:1;
  padding:10px 0;
  color:#e5e7eb;
  font-weight:700;
  font-size:1.05rem;
  text-decoration:none;
  transition:color .25s, transform .2s;
  text-shadow:0 1px 6px rgba(0,0,0,.35);
}
.top-nav a:hover{
  color:#93c5fd;
  transform:scale(1.05);
}

/* Language button (if you use it) */
.top-nav .menu-links .lang-btn{
  margin-left:auto;
  padding:8px 14px;
  border-radius:999px;
  background:#0498fb;
  font-style:italic;
  color:#ffffff;
  text-shadow:none;
}
.top-nav .menu-links .lang-btn:hover{
  background:#162E6A;
  color:#ffffff;
}

/* =========================
   Overview + News (Top page)
   ========================= */
.overview-news .two-col{
  display:grid;
  grid-template-columns:1.3fr 0.7fr;
  gap:2rem;
  align-items:start;
  margin:1rem auto;
  max-width:1100px;
  position:relative;
  background:rgba(255,255,255,0.85);
  border-radius:16px;
  padding:1rem 1.25rem;
  box-shadow:0 4px 16px rgba(0,0,0,0.05);
}
.overview-news .two-col::before{
  content:"";
  position:absolute;
  top:10%;
  bottom:10%;
  left:65%;
  width:1px;
  background:rgba(0,0,0,0.12);
}
.overview-news .overview,
.overview-news .news{
  background:none;
  box-shadow:none;
  padding:0 1rem;
  border-radius:0;
}
.overview-news h2{
  color:#4169E1;
  margin-bottom:0.75rem;
  font-weight:700;
}
.overview-news .overview p{
  font-size:0.95rem;
  line-height:1.8;
  color:#374151;
}
.overview-news .news-list{
  list-style:none;
  margin:0.5rem 0 0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0.6rem;
}
.overview-news .news-list li{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:0.8rem;
  border-bottom:1px dashed rgba(0,0,0,0.1);
  padding-bottom:0.4rem;
}
.overview-news time{
  font-weight:700;
  font-size:0.9rem;
  color:#111827;
  white-space:nowrap;
}
.overview-news span{
  font-size:0.9rem;
  color:#374151;
}
@media (max-width: 800px){
  .overview-news .two-col{
    grid-template-columns:1fr;
    gap:1.5rem;
  }
  .overview-news .two-col::before{
    display:none;
  }
}

/* =========================
   Cards (Top page boxes)
   ========================= */
.section-list{
  max-width:1100px;
  margin:1rem auto;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
}

/* 青いボックス本体 */
.circle-card{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-decoration:none;
  background:#60A5FA;
  color:#ffffff;
  border:none;
  border-radius:12px;
  box-shadow:0 4px 10px rgba(0,0,0,0.05);
  aspect-ratio:6 / 3;
  padding:0.6rem 0.8rem;
  transform:scale(0.92);
  transition:all 0.3s ease;
  text-align:center;
}
.circle-card:hover{
  background:#ffffff;
  color:#60A5FA;
  box-shadow:0 0 20px rgba(150,190,255,0.45);
  transform:scale(0.97);
}

/* ボックス内タイトル */
.card-title{
  font-size:clamp(1.4rem, 2.4vw, 2.2rem);
  font-weight:900;
  letter-spacing:0.18em;
  line-height:1.2;
  margin:0;
}

/* ボックス内サブタイトル */
.card-sub{
  font-size:0.9rem;
  font-weight:700;
  opacity:0.95;
  margin-top:0.35rem;
  line-height:1.3;
}

/* hover時に文字色追従 */
.circle-card:hover .card-title,
.circle-card:hover .card-sub{
  color:#60A5FA;
}

@media (max-width: 900px){
  .section-list{
    gap:10px;
  }
}
@media (max-width: 640px){
  .section-list{
    gap:8px;
  }
  .circle-card{
    transform:scale(0.9);
    aspect-ratio:4/3;
  }
  .card-title{
    font-size:clamp(1.2rem, 5vw, 1.8rem);
    letter-spacing:0.12em;
  }
  .card-sub{
    font-size:0.82rem;
  }
}

/* =========================
   Subpages
   ========================= */
.subpage{
  max-width:900px;
  margin:4rem auto;
  background:#fff;
  padding:2rem;
  border-radius:20px;
  box-shadow:0 8px 20px rgba(0,0,0,0.1);
}
.subpage h2{
  color:#4169E1;
  margin-bottom:1rem;
}
footer{
  background:#374151;
  color:#d1d5db;
  text-align:center;
  padding:1rem;
  margin-top:2rem;
}

/* subpage header colors */
.subpage-body .top-nav{
  background:#4169E1;
  padding:10px 0;
}
.sticky-header{
  background:#4169E1;
}
.sticky-header .header-content{
  background:transparent;
}

/* =========================
   Research page helpers
   （今後も使えるよう残してます）
   ========================= */
.section-list.research-grid{
  grid-template-columns:repeat(3, 1fr);
}
@media (max-width: 900px){
  .section-list.research-grid{
    grid-template-columns:repeat(2, 1fr);
  }
}
@media (max-width: 640px){
  .section-list.research-grid{
    grid-template-columns:1fr;
  }
}

.circle-card.research-card{
  /* Researchは別デザインを上書きしたい時だけ使う */
  aspect-ratio:auto;
  min-height:130px;
  transform:none;
}

.circle-card.research-card .card-title{
  font-size:clamp(1rem, 1.6vw, 1.4rem);
  letter-spacing:0.08em;
  line-height:1.2;
}

.research-desc a{
  color:#1E3A8A;
  font-weight:700;
  text-decoration:none;
}
.research-desc a:hover{
  text-decoration:underline;
}
.subpage-main.publications-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.subpage-hero {
  margin-bottom: 48px;
}

.subpage-hero h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.subpage-hero p {
  line-height: 1.8;
  color: #444;
}

.publications-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.publication-group h3 {
  font-size: 1.4rem;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d9d9d9;
}

.publication-list {
  padding-left: 1.4em;
  margin: 0;
}

.publication-list li {
  margin-bottom: 14px;
  line-height: 1.85;
}

.publication-list em {
  font-style: italic;
}

.site-footer {
  text-align: center;
  padding: 32px 20px;
  color: #666;
  font-size: 0.95rem;
}
.main-title{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.1;
}

.main-title{
  display:flex;
  flex-direction:row;   /* ←これ重要（強制） */
  align-items:baseline;
  gap:16px;
  margin:0;
  flex-wrap:nowrap;     /* ←折り返し禁止 */
}


.main-title .impression{
  font-size:clamp(22px, 4vw, 34px); /* ←ここ小さく */
  opacity:0.9;
}

.title-group{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}

.main-title{
  display:flex;
  flex-direction:row;
  align-items:baseline;
  gap:16px;
  margin:0;
  flex-wrap:nowrap;
}

.main-title .lab-note{
  font-size:clamp(10px, 2vw, 22px);
  color:#e5e7eb;
  opacity:0.9;
  margin-left:8px;
}

.main-title .aiip{
  font-size:clamp(50px, 9vw, 72px);

  .title-header{
  position: relative;
}

.lang-btn{
  position: absolute;
  top: 18px;
  right: 28px;
  z-index: 10;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;
  border-radius: 999px;
  background: #0498fb;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-shadow: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.lang-btn:hover{
  background: #162E6A;
  color: #ffffff;
}

.top-nav .menu-links{
  display:flex;
  align-items:center;
  gap:1rem;
  flex-wrap:nowrap;
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:0 2rem;
  box-sizing:border-box;
}

.top-nav .menu-links a{
  flex-shrink:0;
}

.top-nav .menu-links .lang-btn{
  margin-left:auto;
  flex-shrink:0;
  padding:8px 14px;
  border-radius:999px;
  background:#0498fb;
  color:#ffffff;
  text-shadow:none;
  white-space:nowrap;
}
}