
:root,
:root[data-season="spring"] {
  --bg: #fbf7f7;
  --surface: #ffffff;
  --text: #2a2426;
  --muted: #756b6e;
  --line: #eadfe2;

  --accent: #b66f7d;
  --accent-dark: #8f5360;
  --accent-soft: #f6e8eb;
  --dark: #49353b;

  --header-bg: rgba(251, 247, 247, .94);
  --mobile-nav-bg: rgba(251, 247, 247, .99);
  --hero-start: #fffafa;
  --hero-end: #f5e9ec;
  --hero-glow: rgba(182, 111, 125, .16);
  --card-hover-border: rgba(182, 111, 125, .45);
  --footer-bg: #3f2d33;

  --max: 1120px;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(73, 53, 59, .09);
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
          YuGothic, Meiryo, Arial, sans-serif;
}

:root[data-season="summer"] {
  --bg: #f2f9f8;
  --surface: #ffffff;
  --text: #17302d;
  --muted: #58706c;
  --line: #d5e7e3;

  --accent: #16877b;
  --accent-dark: #09665d;
  --accent-soft: #dff3ef;
  --dark: #123f3a;

  --header-bg: rgba(242, 249, 248, .94);
  --mobile-nav-bg: rgba(242, 249, 248, .99);
  --hero-start: #f7fcfb;
  --hero-end: #dff2ee;
  --hero-glow: rgba(22, 135, 123, .18);
  --card-hover-border: rgba(22, 135, 123, .45);
  --footer-bg: #0d342f;
  --shadow: 0 18px 55px rgba(18, 63, 58, .09);
}

:root[data-season="autumn"] {
  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #33291f;
  --muted: #746657;
  --line: #e7dccd;

  --accent: #9a5d32;
  --accent-dark: #714225;
  --accent-soft: #f3e5d5;
  --dark: #493224;

  --header-bg: rgba(250, 246, 239, .94);
  --mobile-nav-bg: rgba(250, 246, 239, .99);
  --hero-start: #fffaf3;
  --hero-end: #f0dfca;
  --hero-glow: rgba(154, 93, 50, .16);
  --card-hover-border: rgba(154, 93, 50, .45);
  --footer-bg: #3c291f;
  --shadow: 0 18px 55px rgba(73, 50, 36, .09);
}

:root[data-season="winter"] {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --text: #202b33;
  --muted: #64717a;
  --line: #dbe3e8;

  --accent: #52758a;
  --accent-dark: #385567;
  --accent-soft: #e3edf2;
  --dark: #253842;

  --header-bg: rgba(243, 246, 248, .94);
  --mobile-nav-bg: rgba(243, 246, 248, .99);
  --hero-start: #fafcfd;
  --hero-end: #e4ebef;
  --hero-glow: rgba(82, 117, 138, .15);
  --card-hover-border: rgba(82, 117, 138, .45);
  --footer-bg: #1f3039;
  --shadow: 0 18px 55px rgba(37, 56, 66, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0; color: var(--text); background: var(--bg);
  font-family: var(--sans); font-size: 15px; line-height: 1.8;
  letter-spacing: .025em; -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(219,227,223,.9);
  background: var(--header-bg); backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 70px; display: flex; align-items: center;
  justify-content: space-between; gap: 32px;
}
.site-logo { display: flex; flex-direction: column; line-height: 1.25; }
.logo-name { font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.logo-affiliation {
  margin-top: 4px; color: var(--muted); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
}
.global-nav { display: flex; align-items: center; gap: 23px; }
.global-nav a { font-size: 12.5px; font-weight: 600; }
.global-nav a:hover, .global-nav a[aria-current="page"] { color: var(--accent); }
.global-nav .nav-lab {
  padding: 8px 15px; border-radius: 999px; color: #fff; background: var(--accent);
}
.global-nav .nav-lab:hover { color: #fff; background: var(--accent-dark); }

.menu-button {
  display: none; width: 42px; height: 42px; border: 0;
  background: transparent; cursor: pointer;
}
.menu-button span { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--text); }

.hero {
  position: relative; overflow: hidden; padding: 72px 0 80px;
  background:
    radial-gradient(circle at 85% 20%, var(--hero-glow), transparent 30%),
    linear-gradient(145deg, var(--hero-start), var(--hero-end));
}
.hero-grid {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(230px,.55fr);
  gap: 68px; align-items: center;
}
.eyebrow, .section-label {
  margin: 0 0 13px; color: var(--accent); font-size: 12px;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.hero h1 { margin: 0; line-height: 1.25; }
.name-ja { display: block; font-size: clamp(38px,5.2vw,58px); letter-spacing: .07em; }
.name-en { display: block; margin-top: 8px; color: var(--muted); font-size: clamp(18px,2.1vw,25px); font-weight: 400; }
.position { margin: 24px 0 0; font-size: 16px; font-weight: 600; }
.position span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.hero-lead { max-width: 730px; margin: 28px 0 0; font-size: clamp(18px,2vw,23px); font-weight: 600; line-height: 1.7; }
.hero-description { max-width: 700px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  padding: 9px 21px; border: 1px solid transparent; border-radius: 999px;
  font-size: 13px; font-weight: 700; transition: .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.78); }
.button-secondary:hover { color: var(--accent); border-color: var(--accent); }
.portrait-frame {
  overflow: hidden; aspect-ratio: 4/5; max-width: 270px; margin-left: auto;
  border-radius: 28px 28px 78px 28px; background: var(--accent-soft); box-shadow: var(--shadow);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-note { max-width: 270px; margin: 17px 0 0 auto; color: var(--muted); font-size: 11px; text-align: right; line-height: 1.6; }

.page-hero { padding: 60px 0 50px; background: linear-gradient(145deg, var(--hero-start), var(--hero-end)); }
.page-hero h1 { margin: 0; font-size: clamp(34px,4.5vw,50px); line-height: 1.3; }
.page-hero p:last-child { max-width: 760px; margin: 18px 0 0; color: var(--muted); }

.section { padding: 76px 0; }
.section.white { background: var(--surface); }
.section.dark { color: #fff; background: var(--dark); }
.section-heading { max-width: 720px; margin-bottom: 36px; }
.section-heading h2 { margin: 0; font-size: clamp(26px,3.5vw,37px); line-height: 1.38; }
.section-heading > p:last-child { margin: 16px 0 0; color: var(--muted); }
.dark .section-heading > p:last-child { color: rgba(255,255,255,.72); }
.dark .section-label { color: #abd9cd; }

.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.card {
  padding: 27px 25px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}
.card:hover { border-color: var(--card-hover-border); box-shadow: var(--shadow); }
.card-number { margin: 0 0 32px; color: var(--accent); font-size: 12px; font-weight: 700; }
.card h3 { margin: 0; font-size: 20px; line-height: 1.45; }
.card .jp { margin: 10px 0 18px; color: var(--accent); font-size: 13px; font-weight: 700; }
.card p { color: var(--muted); font-size: 14px; }
.text-link { display: inline-flex; gap: 8px; margin-top: 13px; color: var(--accent); font-size: 13px; font-weight: 700; }
.text-link::after { content: "→"; transition: transform .2s; }
.text-link:hover::after { transform: translateX(4px); }

.split { display: grid; grid-template-columns: minmax(220px,.55fr) minmax(0,1.45fr); gap: 75px; }
.prose { max-width: 800px; }
.prose h2, .prose h3 { line-height: 1.45; }
.prose h2 { margin-top: 0; font-size: 28px; }
.prose h3 { margin-top: 34px; font-size: 19px; }
.prose p, .prose li { color: var(--muted); }
.dark .prose p, .dark .prose li { color: rgba(255,255,255,.78); }

.timeline { border-top: 1px solid var(--line); }
.timeline-item {
  display: grid; grid-template-columns: 160px 1fr; gap: 30px;
  padding: 25px 0; border-bottom: 1px solid var(--line);
}
.timeline-item time { color: var(--muted); font-size: 13px; font-weight: 700; }
.timeline-item h3 { margin: 0; font-size: 17px; }
.timeline-item p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

.publication-list { display: grid; gap: 18px; }
.publication {
  padding: 25px 27px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff;
}
.publication .venue { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.publication h3 { margin: 8px 0 5px; font-size: 17px; line-height: 1.55; }
.publication p { margin: 0; color: var(--muted); font-size: 13px; }
.publication a { color: var(--accent); font-weight: 700; }

.info-box {
  padding: 28px 30px; border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0; background: var(--accent-soft);
}
.info-box h3 { margin-top: 0; }
.info-box p:last-child { margin-bottom: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background:#fff; }
.contact-card h2 { margin-top: 0; font-size: 20px; }
.contact-card p { color: var(--muted); }
.contact-card-wide { grid-column: 1 / -1; }

.site-footer { padding: 46px 0 24px; color: rgba(255,255,255,.72); background: var(--footer-bg); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 34px; }
.footer-name { margin: 0 0 5px; color: #fff; font-size: 18px; font-weight: 700; }
.footer-inner p { font-size: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 23px; font-size: 12px; font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.copyright { grid-column: 1/-1; padding-top: 21px; border-top: 1px solid rgba(255,255,255,.1); }

@media (max-width: 930px) {
  .menu-button { display: block; }
  .global-nav {
    position: absolute; top: 70px; right: 0; left: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 14px 24px 24px; border-bottom: 1px solid var(--line); background: var(--mobile-nav-bg);
  }
  .global-nav.is-open { display: flex; }
  .global-nav a { padding: 12px 0; }
  .global-nav .nav-lab { margin-top: 8px; text-align: center; }
  .hero-grid { grid-template-columns: 1fr 230px; gap: 38px; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 710px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .header-inner { min-height: 68px; }
  .global-nav { top: 68px; }
  .logo-affiliation { display: none; }
  .hero { padding: 59px 0 68px; }
  .hero-grid { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 34px; }
  .portrait-frame { width: 180px; margin: 0; border-radius: 20px 20px 50px 20px; }
  .portrait-note { display: none; }
  .name-ja { font-size: 38px; }
  .hero-lead { font-size: 18px; }
  .section { padding: 60px 0; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 25px; }
  .timeline-item { grid-template-columns: 92px 1fr; gap: 15px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .hero-actions, .button-row { flex-direction: column; }
  .button { width: 100%; }
}


/* Detailed publications page */
.compact-hero { padding-top: 48px; padding-bottom: 42px; }
.publication-all-section { padding-top: 48px; }
.publication-all-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 22px;
}
.back-link { margin-top: 0; }
.publication-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.publication-jump a {
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--accent); background: #fff; font-size: 12px; font-weight: 700;
}
.publication-jump a:hover { border-color: var(--accent); background: var(--accent-soft); }
.publication-notice {
  margin-bottom: 32px; padding: 18px 22px; border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0; background: var(--accent-soft);
}
.publication-notice p { margin: 0; color: var(--muted); font-size: 12.5px; }
.publication-notice p + p { margin-top: 4px; }
.publication-notice a { color: var(--accent); font-weight: 700; }
.legacy-publications { min-width: 0; }
.legacy-publications table.achievement {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.legacy-publications table.achievement tr { border-bottom: 1px solid var(--line); }
.legacy-publications table.achievement td { vertical-align: top; padding: 17px 4px; }
.legacy-publications table.achievement td.number {
  width: 54px; min-width: 54px; padding-right: 12px; color: var(--accent); font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.legacy-publications table.achievement td.main { color: var(--muted); font-size: 13.5px; line-height: 1.72; }
.legacy-publications .member { color: var(--text); font-weight: 700; }
.legacy-publications .pub_title { color: var(--text); font-weight: 600; }
.legacy-publications .paper,
.legacy-publications .paper_jp { color: var(--accent); font-weight: 700; }
.legacy-publications .note { color: #a15b16; font-weight: 700; }
.legacy-publications .extra { color: #7a8781; font-size: 11.5px; }
.legacy-publications tr.yet { background: #fbfcfb; }
.legacy-publications img { display: inline-block; width: 60px; max-height: 18px; margin: 4px 4px 0 0; vertical-align: text-bottom; }
.legacy-publications a { color: var(--accent); }
.legacy-publications a:hover { text-decoration: underline; }

.pub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  margin: 4px 6px 0 0;
  padding: 2px 10px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.pub-badge.doi   { color: #a85d0f; }
.pub-badge.pdf   { color: #2465a8; }
.pub-badge.arxiv { color: #a83838; }
.pub-badge.code  { color: #3d7c49; }

.legacy-publications .pub-badge:hover {
  background: rgba(0, 0, 0, .035);
  text-decoration: none;
}
@media (max-width: 710px) {
  .publication-all-toolbar { align-items: flex-start; flex-direction: column; }
  .publication-jump { width: 100%; }
  .publication-jump a { flex: 1 1 calc(50% - 8px); text-align: center; }
  .legacy-publications table.achievement td.number { width: 43px; }
  .legacy-publications table.achievement td.main { font-size: 12.8px; line-height: 1.68; }
  .legacy-publications .extra { font-size: 11px; }
}

/* Publications and Activities: continuous list sections */
.activity-all-section {
  padding-top: 48px;
}

.activity-list,
.publication-sections {
  min-width: 0;
}

.activity-section,
.publication-section {
  scroll-margin-top: 90px;
  margin-top: 58px;
}

.activity-section:first-child,
.publication-section:first-child {
  margin-top: 42px;
}

.activity-label,
.publication-label {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.activity-title,
.publication-title {
  margin: 0 0 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
  font-size: 23px;
  line-height: 1.4;
}

.activity-content {
  max-width: none;
  color: var(--muted);
}

.activity-content h3 {
  margin: 30px 0 9px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

.activity-content h3:first-child {
  margin-top: 0;
}

.activity-content p {
  margin: 6px 0 10px;
  color: var(--muted);
}

.activity-content ul {
  margin: 8px 0 24px;
  padding-left: 1.55em;
}

.activity-content li {
  margin: 3px 0;
  color: var(--muted);
}

.activity-content strong,
.activity-content b {
  color: var(--text);
  font-weight: 700;
}

.activity-subsection + .activity-subsection {
  margin-top: 48px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

.activity-subtitle {
  margin: 0 0 22px !important;
  color: var(--text);
  font-size: 20px !important;
}

@media (max-width: 710px) {
  .activity-all-section {
    padding-top: 40px;
  }

  .activity-section,
  .activity-section:first-child,
  .publication-section,
  .publication-section:first-child {
    margin-top: 46px;
  }

  .activity-title,
  .publication-title {
    margin-bottom: 22px;
    font-size: 20px;
  }

  .activity-content h3 {
    font-size: 17px;
  }
}

.nowrap { white-space: nowrap; }