/* ---------- 色・基本 ---------- */
:root {
  --text: #1c2433;
  --muted: #64708a;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --accent: #1a5fb4;
  --accent-2: #0fa3a3;
  --ink: #0d2240;          /* ヘッダー・フッター */
  --grad: linear-gradient(120deg, #0d2240 0%, #1a5fb4 55%, #0fa3a3 100%);
  --max: 48rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e4e9f2;
    --muted: #93a0b8;
    --line: #2a3344;
    --bg: #111722;
    --bg-alt: #161e2c;
    --accent: #6fa8ff;
    --accent-2: #3fd0c9;
    --ink: #0a101b;
    --grad: linear-gradient(120deg, #0a1426 0%, #163f7a 55%, #0b6f73 100%);
  }
}

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

*, *::before, *::after { box-sizing: border-box; }


html {
  font-family: "Noto Sans JP", "Segoe UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; }

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

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- ヘッダー・フッター ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
}
.site-title {
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
}
.site-title:hover { text-decoration: none; opacity: .85; }
.site-nav { display: flex; gap: 1rem; font-size: .85rem; }
.site-nav a {
  color: #fff;
  padding: .2rem .8rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
}
.site-nav a:hover { text-decoration: none; background: rgba(255, 255, 255, .12); }

.site-footer {
  padding: 2.5rem 0 3rem;
  background: var(--ink);
  color: rgba(255, 255, 255, .6);
  font-size: .8rem;
}

/* ---------- ヒーロー（プロフィール） ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
}
.hero::after {               /* 右上の淡い光 */
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 65%);
  pointer-events: none;
}
.profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.profile img {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 4px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.profile h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .02em;
}
.profile h1 small {
  font-size: 1rem;
  font-weight: 400;
  opacity: .8;
  margin-left: .35rem;
}
.profile .affiliation { margin: .4rem 0 1rem; opacity: .85; }
.profile .links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .85rem;
}
.profile .links a {
  display: inline-block;
  padding: .3rem .95rem;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  transition: background .15s;
}
.profile .links a:hover { text-decoration: none; background: rgba(255, 255, 255, .28); }
@media (max-width: 560px) {
  .profile { flex-direction: column; text-align: center; gap: 1.25rem; padding-top: 3rem; padding-bottom: 3rem; }
  .profile h1 { font-size: 1.75rem; }
  .profile .links { justify-content: center; }
}

/* ---------- セクション ---------- */
.section { padding: 3.5rem 0; }
.section:nth-of-type(odd) { background: var(--bg-alt); }

.content h2 {
  margin: 0 0 2rem;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.3;
}
.content h2::after {         /* 見出し下のグラデーションバー */
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: .6rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.content h3, .content h4 {
  margin: 2rem 0 .9rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}
.content h3 {
  padding-left: .75rem;
  border-left: 4px solid var(--accent-2);
}
.content h3:first-child, .content h2 + h3 { margin-top: 0; }
.content h3 small, .content h4 small {
  margin-left: .6rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
}

.content p { margin: 0 0 1rem; }
.content ul, .content ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.content li { margin-bottom: .45rem; }
.content li::marker { color: var(--accent-2); }
.content hr { display: none; }
.content small { color: var(--muted); font-size: .85rem; }
.content blockquote {
  margin: 0 0 1rem;
  padding: .5rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: var(--bg-alt);
  color: var(--muted);
}
.content code {
  font-size: .9em;
  padding: .1em .35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.content td, .content th {
  padding: .5rem .75rem .5rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

/* 経歴（定義リスト）をタイムラインとして表示 */
.content dl {
  display: grid;
  grid-template-columns: 10rem 1fr;
  margin: 0 0 1.5rem;
}
.content dt, .content dd { margin: 0; padding: .35rem 0 1.1rem; }
.content dt {
  padding-right: 1.25rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.content dd {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line);
}
.content dd::before {        /* タイムラインの点 */
  content: "";
  position: absolute;
  left: -7px;
  top: .75rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-2);
}
.content dd ul {
  margin: .2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .85rem;
}
.content dd li { margin: 0; }
.content dd li::before { content: "– "; }
.section:nth-of-type(odd) .content dd::before { background: var(--bg-alt); }
@media (max-width: 560px) {
  .content dl { grid-template-columns: 1fr; border-left: 2px solid var(--line); }
  .content dt { padding: .1rem 0 0 1.5rem; position: relative; }
  .content dt::before {
    content: "";
    position: absolute;
    left: -7px;
    top: .5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent-2);
  }
  .section:nth-of-type(odd) .content dt::before { background: var(--bg-alt); }
  .content dd { border-left: 0; padding-top: 0; }
  .content dd::before { display: none; }
}

/* 業績：タイトル / 著者 / 掲載先の 3 段。自分の名前を強調し、リンクを小さなボタンに */
.section-publications ul { padding-left: 0; list-style: none; }
.section-publications li { margin-bottom: .8rem; }
.section-publications li.pub {
  padding: .1rem 0 .1rem 1rem;
  margin-bottom: 1.1rem;
  border-left: 2px solid var(--line);
  line-height: 1.6;
  transition: border-color .15s;
}
.section-publications li.pub:hover { border-left-color: var(--accent-2); }
.pub-title, .pub-authors, .pub-venue { display: block; }
.pub-title { font-weight: 700; }
.pub-authors { margin-top: .15rem; font-size: .9rem; }
.pub-venue { margin-top: .1rem; color: var(--muted); font-size: .85rem; }
.section-publications li strong { color: var(--accent); }
.section-publications li a {
  display: inline-block;
  margin-left: .15rem;
  padding: 0 .6rem;
  font-size: .75rem;
  line-height: 1.7;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 999px;
  white-space: nowrap;
}
.section-publications li a:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 20%, transparent); }

/* リンク集：カード状に並べる */
.section-links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: .75rem;
  padding: 0;
  list-style: none;
}
.section-links li {
  margin: 0;
  padding: .8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.6;
  transition: border-color .15s, transform .15s;
}
.section-links li:hover { border-color: var(--accent-2); transform: translateY(-2px); }

/* ---------- ブログ ---------- */
.page-hero {
  background: var(--grad);
  color: #fff;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2.5rem;
}
.page-hero h1 { margin: 0 0 .4rem; font-size: 1.8rem; font-weight: 800; line-height: 1.4; }
.page-hero .post-meta, .page-hero .post-meta a { color: rgba(255, 255, 255, .8); }

.post-meta { color: var(--muted); font-size: .85rem; }
.post-meta a { color: var(--accent); }
.post-meta a::before { content: "#"; }
.post-meta a + a { margin-left: .6em; }
.post-meta .sep { margin: 0 .5rem; }
.post-body img { display: block; margin: 1.5rem auto; border-radius: 8px; }
.post-footer { margin: 3rem 0 4rem; font-size: .9rem; }

.post-list { list-style: none; padding: 0; margin: 0 0 4rem; }
.post-list li {
  margin-bottom: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
}
.post-list h3 { margin: .1rem 0 .3rem; font-size: 1.15rem; }
.post-list p { margin: 0; color: var(--muted); font-size: .9rem; }

main > .wrap.content:last-child { padding-bottom: 3rem; }

/* ページ内リンクで固定ヘッダーに隠れないように */
[id] { scroll-margin-top: 4.5rem; }
