:root{
  --bg:#f6f8fc;
  --surface:#ffffff;
  --surface-2:#eef3fb;
  --text:#142033;
  --muted:#5b677a;
  --line:#d8e0ee;
  --primary:#173b7a;
  --primary-2:#305fb1;
  --accent:#6e8ed8;
  --shadow:0 12px 30px rgba(16,36,70,.08);
  --radius:20px;
  --max:1120px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic","Meiryo",sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#f8fbff 0%,#f5f7fb 100%);
  line-height:1.8;
}
a{color:var(--primary-2);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto;display:block}
.container{width:min(var(--max),calc(100% - 32px));margin:0 auto}
.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:16px;top:16px;background:#fff;padding:8px 12px;border-radius:10px;z-index:1000}
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.84);backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(216,224,238,.8);
}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 0}
.brand{display:flex;flex-direction:column;gap:2px}
.brand-title{font-size:1.05rem;font-weight:800;letter-spacing:.02em;color:var(--primary)}
.brand-sub{font-size:.84rem;color:var(--muted)}
.nav{display:flex;gap:18px;flex-wrap:wrap;align-items:center}
.nav a{font-weight:700;color:var(--text)}
.nav .lang{padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:#fff}
.hero{
  padding:72px 0 48px;
  background:
    radial-gradient(circle at top right, rgba(86,125,207,.18), transparent 32%),
    radial-gradient(circle at top left, rgba(49,95,177,.12), transparent 28%);
}
.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:30px;align-items:center}
.eyebrow{display:inline-block;padding:8px 12px;border-radius:999px;background:#eaf1ff;color:var(--primary);font-weight:800;font-size:.9rem}
.hero h1{font-size:clamp(2rem,4vw,3.8rem);line-height:1.15;margin:18px 0 16px;letter-spacing:.01em}
.hero p{font-size:1.06rem;color:var(--muted);max-width:62ch;margin:0 0 22px}
.hero-points{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 26px;padding:0;list-style:none}
.hero-points li{background:#fff;border:1px solid var(--line);padding:10px 14px;border-radius:999px;font-weight:700;box-shadow:var(--shadow)}
.cta-row{display:flex;gap:12px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:13px 18px;border-radius:999px;font-weight:800;border:1px solid transparent}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff}
.btn-secondary{background:#fff;border-color:var(--line);color:var(--primary)}
.hero-card,.card,.feature-card,.profile-card,.thesis-card,.timeline-item,.gallery-card,.news-card,.info-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)
}
.hero-card{padding:26px}
.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.stat{padding:18px;border-radius:16px;background:var(--surface-2)}
.stat strong{display:block;font-size:1.5rem;color:var(--primary);line-height:1.2}
.stat span{display:block;color:var(--muted);font-size:.95rem;margin-top:6px}
.section{padding:34px 0}
.section-tight{padding:22px 0}
.section-header{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:18px}
.section-header h2{margin:0;font-size:1.8rem;line-height:1.25}
.section-header p{margin:0;color:var(--muted);max-width:62ch}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.card,.feature-card,.news-card,.info-card,.thesis-card,.timeline-item{padding:24px}
.feature-card h3,.profile-card h3,.card h3,.thesis-card h3{margin-top:0;margin-bottom:10px;font-size:1.2rem;line-height:1.35}
.feature-card p,.card p,.news-card p,.info-card p,.profile-card p,.thesis-card p{margin:0;color:var(--muted)}
.icon-label{display:inline-block;margin-bottom:12px;padding:6px 10px;border-radius:999px;background:#eef4ff;color:var(--primary);font-weight:800;font-size:.82rem}
.list-clean{margin:14px 0 0;padding-left:1.1em}
.list-clean li{margin:.35em 0}
.split{display:grid;grid-template-columns:1.1fr .9fr;gap:20px}
.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.notice{padding:18px 20px;background:#edf4ff;border:1px solid #cfe0ff;border-radius:16px;color:var(--primary)}
.news-list{display:grid;gap:14px}
.news-item{padding:18px 20px;border:1px solid var(--line);border-radius:16px;background:#fff}
.news-item time{display:block;font-size:.9rem;font-weight:800;color:var(--primary);margin-bottom:6px}
.news-item p{margin:0;color:var(--text)}
.news-item small{display:block;margin-top:6px;color:var(--muted)}
.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.profile-card{overflow:hidden}
.profile-card img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#eef2f8}
.profile-body{padding:22px}
.meta{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 12px}
.badge{display:inline-flex;padding:6px 10px;border-radius:999px;background:#eef3fb;color:var(--primary);font-size:.85rem;font-weight:800}
.profile-body .mail{font-weight:700;word-break:break-all}
.table-like{display:grid;gap:14px}
.thesis-grid{display:grid;gap:16px}
.thesis-card .year{font-weight:800;color:var(--primary);margin-bottom:6px}
.timeline{display:grid;gap:16px}
.timeline-item{display:grid;grid-template-columns:120px 1fr;gap:20px;align-items:start}
.timeline-year{font-size:1.2rem;font-weight:800;color:var(--primary)}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.gallery-card{overflow:hidden}
.gallery-card img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#eef2f8}
.gallery-card .caption{padding:14px 16px;color:var(--text);font-size:.95rem;line-height:1.65}
.gallery-year{margin:8px 0 16px;font-size:1.35rem;color:var(--primary)}
.reference-links{display:grid;gap:8px;margin-top:14px}
.site-footer{margin-top:40px;padding:28px 0;background:#0f1e38;color:#dae3f3}
.footer-grid{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center}
.footer-grid a{color:#dae3f3}
.small{font-size:.92rem;color:var(--muted)}
.callout{padding:18px 20px;border-radius:16px;background:#fff8ea;border:1px solid #f0dfb5;color:#75550d}
@media (max-width:900px){
  .hero-grid,.grid-3,.grid-2,.split,.info-grid,.profile-grid,.gallery-grid{grid-template-columns:1fr}
  .timeline-item{grid-template-columns:1fr;gap:8px}
}


.tag-new{background:#e60023;color:#fff;font-size:12px;padding:2px 6px;border-radius:4px;margin-left:6px;}



/* Robust mobile navigation using details/summary */
.mobile-nav{display:none}
.mobile-nav summary{
  list-style:none;
}
.mobile-nav summary::-webkit-details-marker{
  display:none;
}
.mobile-nav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:44px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--primary);
  font-weight:800;
  cursor:pointer;
}




/* Clean mobile navigation + footer */
.desktop-nav{display:flex}
.mobile-nav{display:none}
.mobile-nav summary{list-style:none}
.mobile-nav summary::-webkit-details-marker{display:none}
.mobile-nav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:44px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--primary);
  font-weight:800;
  cursor:pointer;
}
.mobile-nav-panel{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:8px;
  padding-top:10px;
}
.mobile-nav-panel a{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  font-weight:700;
  white-space:nowrap;
}
.mobile-nav-panel .lang{color:var(--primary)}

@media screen and (max-width: 980px){
  .site-header .header-inner{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    flex-wrap:nowrap !important;
    gap:12px !important;
  }
  .site-header .brand{
    flex:1 1 auto !important;
    min-width:0 !important;
  }
  .site-header nav.nav.desktop-nav{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    overflow:hidden !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
  }
  .site-header details.mobile-nav{
    display:block !important;
  }

  .site-footer .footer-grid{
    display:block !important;
  }
  .site-footer .footer-address,
  .site-footer .footer-copy{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }
  .site-footer .footer-copy{
    margin-top:12px !important;
    text-align:left !important;
  }
  .site-footer .small{
    line-height:1.8 !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
  }
}


/* v3 final mobile menu + footer overrides */
.mobile-nav-panel{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  padding-top:10px !important;
  align-items:flex-start !important;
}
.mobile-nav-panel a{
  display:inline-flex !important;
  width:auto !important;
  max-width:100% !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  background:#fff !important;
  border:1px solid var(--line) !important;
  color:var(--text) !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}
.mobile-nav-panel .lang{
  color:var(--primary) !important;
}

@media screen and (max-width: 980px){
  .site-header nav.nav.desktop-nav{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    overflow:hidden !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
  }
  .site-header details.mobile-nav{
    display:block !important;
  }
  .site-header .header-inner{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    flex-wrap:nowrap !important;
    gap:12px !important;
  }
  .site-header .brand{
    flex:1 1 auto !important;
    min-width:0 !important;
  }

  .site-footer .footer-grid{
    display:block !important;
  }
  .site-footer .footer-address,
  .site-footer .footer-copy{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }
  .site-footer .footer-copy{
    margin-top:12px !important;
    text-align:left !important;
  }
  .site-footer .small{
    line-height:1.8 !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
  }
}


/* v21 header layout: stacked on mobile */
@media screen and (max-width: 980px){
  .site-header .header-inner{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:10px !important;
  }
  .site-header .brand{
    width:100% !important;
    flex:none !important;
    min-width:0 !important;
  }
  .site-header details.mobile-nav{
    display:block !important;
    width:100% !important;
  }
  .site-header .mobile-nav-toggle{
    display:inline-flex !important;
    width:auto !important;
    align-self:flex-start !important;
  }
  .site-header .mobile-nav-panel{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
    gap:8px !important;
    padding-top:10px !important;
    width:100% !important;
  }
}
