:root {
  --bg: #ffffff;
  --panel: #f4f7fa;
  --line: #e2e4e8;
  --accent: #124f8f;
  --accent-soft: #dceafe;
  --text: #1f2933;
  --muted: #5f6b7a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 960px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-weight: 700; color: var(--text); }
.nav-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.container { max-width: 960px; margin: 0 auto; padding: 8px 24px 48px; }
section { padding-top: 36px; }
h1 { font-size: 30px; margin: 0 0 4px; }
h2 {
  font-size: 21px; margin: 0 0 14px; padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-soft);
}
h3 { font-size: 16px; margin: 20px 0 8px; }
.muted { color: var(--muted); }

.hero { display: flex; gap: 32px; align-items: flex-start; }
.avatar {
  width: 180px; height: 180px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  background: var(--panel); border: 1px solid var(--line);
}
.avatar-missing { visibility: hidden; }
.role { color: var(--muted); margin: 0 0 12px; }
.hero-text p { margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chips span {
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 5px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.news { list-style: none; padding: 0; margin: 0; }
.news-wrap { position: relative; border: 1px solid var(--line); border-radius: 10px; }
.news-box { max-height: 290px; overflow: hidden; padding: 0 18px; cursor: pointer; }
.news-wrap.active .news-box { overflow-y: auto; cursor: auto; }
.news-wrap.active { border-color: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.news-wrap.more::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 40px; pointer-events: none;
  border-radius: 0 0 10px 10px; background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.news li { display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: none; }
.news .date { flex: 0 0 72px; font-weight: 600; }
.date { color: var(--muted); font-size: 14px; white-space: nowrap; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.filters button {
  font: inherit; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  padding: 3px 12px; border-radius: 999px;
}
.filters button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.pub {
  display: flex; gap: 20px; padding: 14px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.pub:hover { background: var(--panel); }
.thumb { flex: 0 0 200px; }
.thumb img {
  width: 200px; height: 120px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
}
.pub-body { flex: 1; min-width: 0; }
.pub-title { font-weight: 600; }
.pub-authors { font-size: 14px; color: var(--muted); }
.pub-authors .me { color: var(--text); }
.pub-venue { font-size: 14px; margin: 2px 0 6px; display: flex; gap: 8px; align-items: center; }
.venue { font-style: italic; font-weight: 500; }
.badge {
  background: #fff4e5; color: #9a5b00; border: 1px solid #f5d9a8;
  padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
}
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-link {
  font-size: 12.5px; font-weight: 500; padding: 1px 9px;
  border: 1px solid var(--accent); border-radius: 6px;
}
.tag-link:hover { background: var(--accent); color: #fff; text-decoration: none; }
.topic { font-size: 12px; color: var(--muted); background: var(--panel); padding: 1px 8px; border-radius: 6px; }

.row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.row-org { font-weight: 600; }
.row-org .muted { font-weight: 400; }

.plain { padding-left: 18px; margin: 0; }
.plain li { padding: 2px 0; }
.plain .date { margin-left: 6px; }

.footer {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 24px; border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { flex-direction: column; }
  .pub { flex-direction: column; }
  .thumb, .thumb img { width: 100%; flex-basis: auto; }
  .row { flex-direction: column; gap: 2px; }
}
.projects { margin: 2px 0 0; padding-left: 18px; font-size: 14.5px; }
.projects .date { margin-left: 6px; }
.row-main { flex: 1; min-width: 0; }
.logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; margin-top: 3px; }
.projects { list-style: none; padding-left: 0; }
.projects li { display: flex; gap: 8px; }
.projects li::before { content: "•"; color: var(--muted); }
.projects li > .muted { flex: 1; }
.venue.pending { font-weight: 400; color: var(--muted); }
h1 .native { font-weight: 400; color: var(--muted); margin-left: 2px; }
h1 .hanja { font-family: "Yuji Syuku", serif; color: var(--text); font-size: 0.92em; margin: 0 2px; }
.pub-group { font-size: 15px; color: var(--muted); font-weight: 600; margin: 18px 0 10px; }
.show-all {
  font: inherit; font-size: 14px; cursor: pointer; display: block; margin: 4px auto 0;
  border: 1px solid var(--accent); color: var(--accent); background: var(--bg);
  padding: 5px 16px; border-radius: 8px;
}
.show-all:hover { background: var(--accent); color: #fff; }
.hero-side { flex-shrink: 0; width: 180px; text-align: center; }
.motto { margin: 12px 0 0; font-style: italic; color: var(--muted); font-size: 14px; }
@media (max-width: 720px) {
  .hero-side { width: auto; text-align: left; }
}
