:root{
  --bg:#ffffff;
  --fg:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --link:#1d4ed8;

  --nav:#243646;                 /* 紺色は固定（ここだけ触れば全体変わる） */
  --maxw: 980px;

  --padx: 18px;
  --radius: 12px;
  --lh: 1.7;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
          "Hiragino Kaku Gothic ProN", "Noto Sans", "Yu Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* ===== Reset / Base ===== */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--font);
  line-height:var(--lh);
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

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

.muted{ color:var(--muted); }
.mono{ font-family:var(--mono); }

h1,h2,p{ margin:0; }
p{ margin:10px 0; }

section{ margin: 22px 0; }
h2{
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
}

ul{ margin: 8px 0 0 18px; }
li{ margin: 6px 0; }

/* ===== Layout ===== */
.wrap{
  width: min(var(--maxw), 100%);
  margin-inline: auto;
  padding: 28px var(--padx) 40px;
}


/* ===== Topbar ===== */
.topbar{
  background: var(--nav);
  color: #fff;
}

.topbar-inner{
  width: min(var(--maxw), 100%);
  margin-inline: auto;
  padding: 10px var(--padx);

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}


/* 左：ブランド */
.topbar-brand{
  white-space: nowrap;
}
.topbar-brand a{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  opacity:.9;
}
.topbar-brand a:hover{ opacity:1; }

/* 中央：メニュー（完全中央） */
.topbar-menu{
  justify-self: center;
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* タブ見た目（現状踏襲） */
.topbar-menu a{
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  padding:6px 10px;
  border-radius:999px;
  opacity:.82;
  border: 1px solid rgba(255,255,255,.18);
  transition: opacity .15s ease, background .15s ease, border-color .15s ease;
}
.topbar-menu a:hover{
  opacity:1;
  background: rgba(255,255,255,.10);
}
.topbar-menu a.active{
  opacity:1;
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
}

/* 右：言語切替（バー内・右端固定） */
.topbar-lang{
  justify-self: end;
  display:flex;
  align-items:center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
}
.topbar-lang a{
  color:#fff;
  text-decoration:none;
  opacity:.9;
}
.topbar-lang a:hover{ opacity:1; text-decoration:underline; }
.topbar-lang .sep{ color: rgba(255,255,255,.6); }

/* ===== Notes / lists ===== */
.note{
  border-left: 3px solid var(--line);
  padding-left: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== Publications ===== */
details.year{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 10px 0;
}
details.year > summary{
  cursor: pointer;
  list-style: none;
  display:flex;
  align-items:baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}
details.year > summary::-webkit-details-marker{ display:none; }

.count{
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}

.pubtype{
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

ol.pubs{
  margin: 6px 0 10px 18px;
  padding: 0;
}
.pub{ margin: 10px 0; }
.pub .title{ font-weight: 650; }
.pub .meta{ color: var(--muted); }
.pub .links{
  margin-top: 4px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  font-size: 13px;
}

/* ===== News ===== */
.newslist{ list-style:none; padding:0; margin:24px 0; }
.newsitem{ padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,.08); }

.newsline{ display:flex; gap: 8px; align-items: baseline; }
.newsdate{ font-variant-numeric: tabular-nums; white-space: nowrap; }

.newsbody{
  margin-top: 6px;
  padding-left: 0;
  opacity: .85;
  line-height: 1.6;
}

/* ===== Pager ===== */
.pager{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 28px;
}
.pager a{ text-decoration:none; }

/* ===== Latest panel ===== */
.latest{
  margin: 0;
  padding-left: 1.2em;
}
.latest li{ margin: 8px 0; }
.latest strong{
  display:inline-block;
  min-width: 7.5em;
}

/* ===== Footer ===== */
.footer{
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ===== Small screens ===== */
@media (max-width: 640px){
  .topbar-inner{
    grid-template-columns: 1fr; /* 縦積み */
    justify-items: start;
    padding: 10px 14px;
    gap: 10px;
  }
  .topbar-menu{
    justify-self: start;
    gap: 12px;
  }
  .topbar-lang{
    justify-self: start;  /* スマホでは左に寄せる（好みで end にしてもOK） */
  }
}

/* ===== Utility ===== */
.me{
  font-weight:700;
  text-decoration: underline;
}

.news-hero{
  width: min(720px, 100%);  /* 本文幅に自然に揃う */
  height: 400px;            /* ← 見せるには最低これくらい */
  margin: 16px auto 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: #f3f4f6;
}

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

/* キャプション */
.news-hero-cap{
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.cv-actions {
  margin: 0.5rem 0 1rem;
}

.cv-embed {
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
}
