/* Homepage styles are scoped so the other pages keep their existing theme. */
body.home-page {
  --global-bg-color: #fafbfd;
  --global-text-color: #233442;
  --global-text-color-light: #657381;
  --global-theme-color: #326b88;
  --global-hover-color: #24576e;
  --global-code-bg-color: #edf3f7;
  --global-divider-color: #e0e7ed;
  --global-card-bg-color: #fff;
  --home-muted-color: #657381;
}
html[data-theme="dark"] body.home-page {
  --global-bg-color: #171e27;
  --global-text-color: #e5edf4;
  --global-text-color-light: #b5c1cf;
  --global-theme-color: #8ecbd0;
  --global-hover-color: #b2e1e5;
  --global-code-bg-color: #263544;
  --global-divider-color: #33404f;
  --global-card-bg-color: #202a36;
  --home-muted-color: #b5c1cf;
}
.home-page #navbar > .container { max-width: 1120px; }
.home-container { padding-top: 1rem; }
.home-container section[id] { scroll-margin-top: 90px; }
.home-container .profile-hero { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr) 225px; gap: 1.6rem; align-items: center; padding: 2rem; margin: .5rem 0 1.4rem; border: 1px solid var(--global-divider-color); border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse at 95% 15%, rgba(68,142,158,.13), transparent 52%), radial-gradient(ellipse at 10% 100%, rgba(139,107,180,.09), transparent 52%), var(--global-card-bg-color); }
.home-container .profile-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(#8fa9ba .7px, transparent .7px); background-size: 19px 19px; opacity: .18; mask-image: linear-gradient(to left, #000, transparent 60%); }
.home-container .profile-side, .home-container .profile-intro, .profile-visual { position: relative; z-index: 1; }
.home-container .profile-side { align-items: center; gap: 1rem; }
.home-container .profile-photo-wrap { width: 100%; max-width: 170px; padding: 5px; background: var(--global-card-bg-color); border: 1px solid var(--global-divider-color); border-radius: 17px; box-shadow: 0 9px 24px rgba(35,52,66,.07); }
.home-container .profile-photo { border-radius: 12px; box-shadow: none; }
.home-container .profile-kicker { margin-bottom: .55rem; font-size: .67rem; letter-spacing: .07em; line-height: 1.65; color: var(--global-theme-color); }
.home-container .profile-intro .post-title { margin-bottom: .8rem; font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.home-container .profile-intro .post-title span { color: var(--global-theme-color); }
.home-container .profile-affiliation { font-size: .94rem; line-height: 1.65; margin-bottom: .8rem; }
.home-container .profile-summary { color: var(--home-muted-color); font-size: .9rem; line-height: 1.8; margin-bottom: 1rem; }
.home-container .profile-actions { margin: 1rem 0 .8rem; }
.home-container .profile-actions .btn { color: var(--global-text-color); background: var(--global-card-bg-color); border-radius: 8px; font-size: .78rem; padding: .45rem .85rem; margin: 0; }
.home-container .profile-actions .btn:first-child { color: #fff; background: #326b88; border-color: #326b88; }
.home-container .profile-actions .btn:hover { border-color: var(--global-theme-color); text-decoration: none; }
.home-container .profile-contact { color: var(--home-muted-color); font-size: .76rem; line-height: 1.65; }
.home-container .profile-motto { color: var(--home-muted-color); font-size: .78rem; margin-top: .8rem; }
.home-container .social .contact-icons { justify-content: center; width: 100%; gap: .65rem; font-size: 1.05rem; }
.home-container .profile-side .social { width: 100%; }
.profile-visual { align-self: center; }
.profile-visual img { display: block; width: 100%; height: auto; }
.home-container .collaboration-banner { margin-bottom: 1rem; border-radius: 11px; background: var(--global-card-bg-color); }
.home-section-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.home-section-nav a { display: inline-block; padding: .4rem .8rem; border-radius: 7px; color: var(--home-muted-color); font-size: .8rem; }
.home-section-nav a:first-child { color: var(--global-theme-color); background: var(--global-code-bg-color); }
.home-section-nav a:hover { background: var(--global-code-bg-color); color: var(--global-theme-color); text-decoration: none; }
.home-container .research-overview, .home-container .site-explore, .home-container .news, .home-container .home-service { margin: 2.25rem 0; }
.home-container .research-overview h2, .home-container .site-explore h2, .home-container .news h2, .home-container .home-section-heading h2 { display: flex; align-items: center; gap: .7rem; font-size: 1.45rem; line-height: 1.4; font-weight: 500; letter-spacing: -.025em; margin: 0 0 1.15rem; padding: 0; border: 0; }
.home-section-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 11px; color: var(--global-theme-color); background: var(--global-code-bg-color); }
.home-section-icon i { font-size: .95rem; }
.home-section-intro { max-width: 55rem; font-size: .93rem; line-height: 1.85; color: var(--home-muted-color); margin-bottom: 1.5rem; }
.research-area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.research-area { --research-wash: rgba(68,142,158,.08); position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 1.1rem; padding: 1.3rem; min-width: 0; border: 1px solid var(--global-divider-color); border-radius: 17px; background: var(--global-card-bg-color); transition: box-shadow .2s, border-color .2s; }
.research-area:hover { border-color: #9db7c8; box-shadow: 0 8px 22px rgba(35,52,66,.045); }
.research-registration { --research-wash: rgba(139,107,180,.08); }
.research-unsupervised { --research-wash: rgba(200,151,82,.08); }
.research-embodied { --research-wash: rgba(92,133,181,.08); }
.research-generation { --research-wash: rgba(68,142,158,.075); }
.research-visual { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 146px; border-radius: 13px; background: radial-gradient(ellipse at center, var(--research-wash), transparent 80%); }
.research-visual img { display: block; width: 100%; height: auto; }
.research-copy { min-width: 0; }
.research-copy h3 { font-size: 1rem; line-height: 1.5; font-weight: 500; margin: 0 0 .55rem; }
.research-copy p { font-size: .85rem; color: var(--home-muted-color); line-height: 1.85; margin: 0; }
.home-background { font-size: .83rem; line-height: 1.8; color: var(--home-muted-color); margin: 1.4rem 0 0; padding: 1rem 1.25rem; border-left: 3px solid #9cb9c8; border-radius: 0 10px 10px 0; background: var(--global-code-bg-color); }
.home-container .news-scroll-wrap { padding: .6rem 1.25rem; border: 1px solid var(--global-divider-color); border-radius: 16px; background: var(--global-card-bg-color); overflow: hidden; }
.home-container .news-scroll-wrap::after { background: linear-gradient(to bottom, transparent, var(--global-card-bg-color)); height: 1.4rem; }
.home-container .news-scroll { max-height: 20rem; scrollbar-width: thin; scrollbar-color: #aac0ce transparent; }
.home-container .news-scroll table { table-layout: fixed; width: 100%; margin-bottom: 0; }
.home-container .news table th { position: relative; color: var(--global-theme-color); font-size: .75rem; width: 100px; font-weight: 500; padding-left: 1rem; white-space: nowrap; }
.home-container .news table th::before { content: ''; position: absolute; left: 0; top: 1.12rem; width: 5px; height: 5px; border-radius: 50%; background: #78a6b5; box-shadow: 0 0 0 3px var(--global-code-bg-color); }
.home-container .news table td { font-size: .86rem; line-height: 1.8; overflow-wrap: anywhere; }
.home-container .news table th, .home-container .news table td { padding-top: .65rem; padding-bottom: .65rem; border-bottom: 1px solid var(--global-divider-color); }
.home-container .news table tr:last-child th, .home-container .news table tr:last-child td { border-bottom: 0; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1.1rem; }
.home-container .home-section-heading h2 { margin: 0; }
.home-section-heading > a { font-size: .8rem; }
.home-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.home-service-card { padding: 1.5rem; border: 1px solid var(--global-divider-color); border-radius: 17px; background: var(--global-card-bg-color); }
.recognition-card { background: linear-gradient(120deg, rgba(200,151,82,.075), transparent 65%), var(--global-card-bg-color); }
.community-card { background: linear-gradient(120deg, rgba(92,133,181,.065), transparent 65%), var(--global-card-bg-color); }
.home-service-card h3 { display: flex; align-items: center; gap: .55rem; font-size: 1rem; font-weight: 500; margin-bottom: 1.1rem; }
.service-heading-icon { display: inline-flex; color: var(--global-theme-color); }
.home-service-card p { color: var(--home-muted-color); font-size: .85rem; line-height: 1.85; }
.home-recognition-list { list-style: none; padding: 0; margin: 0; }
.home-recognition-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--global-divider-color); }
.home-recognition-list li:first-child { padding-top: 0; border-top: 0; }
.recognition-mark { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; height: 36px; border: 1px solid rgba(200,151,82,.25); border-radius: 50%; color: #a57630; background: rgba(200,151,82,.09); }
.recognition-copy strong { display: block; color: var(--global-text-color); font-size: .84rem; font-weight: 500; }
.recognition-copy > span { display: block; margin-top: .2rem; font-size: .78rem; line-height: 1.65; color: var(--home-muted-color); }
.home-detail-link { font-size: .8rem; }
.site-explore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.site-explore-card { display: block; padding: 1.5rem; border: 1px solid var(--global-divider-color); border-radius: 17px; color: var(--global-text-color); background: var(--global-card-bg-color); transition: border-color .2s, box-shadow .2s; }
.site-explore-card:hover { color: var(--global-text-color); border-color: #9db7c8; box-shadow: 0 8px 22px rgba(35,52,66,.045); text-decoration: none; }
.site-explore-card > i { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; color: #527fa1; background: rgba(92,133,181,.09); border-radius: 12px; margin-bottom: 1rem; font-size: 1.15rem; }
.site-explore-card:nth-child(2) > i { color: #8b6bb4; background: rgba(139,107,180,.09); }
.site-explore-card:nth-child(3) > i { color: #448e9e; background: rgba(68,142,158,.09); }
.site-explore-card h3 { font-size: 1.05rem; font-weight: 500; }
.site-explore-card p { font-size: .84rem; line-height: 1.8; color: var(--home-muted-color); }
.site-explore-card > span { color: var(--global-theme-color); font-size: .78rem; }
.site-explore-card > span span { color: inherit; }
.home-container a:focus-visible, .home-container .news-scroll:focus-visible { outline: 2px solid var(--global-theme-color); outline-offset: 4px; }
.home-container .news-scroll:focus-visible { outline-offset: -2px; }
html[data-theme="dark"] .research-visual img, html[data-theme="dark"] .profile-visual img { filter: brightness(1.25); }
html[data-theme="dark"] .recognition-mark { color: #e0b777; }
@media (min-width: 851px) { .research-area:last-child:nth-child(odd) { grid-column: 1 / -1; grid-template-columns: 230px minmax(0, 1fr); } }
@media (max-width: 1040px) {
  .home-container .profile-hero { grid-template-columns: 160px minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem; }
  .profile-visual { display: none; }
  .research-area { grid-template-columns: 125px minmax(0, 1fr); gap: .7rem; padding: 1.1rem; }
}
@media (max-width: 850px) { .research-area-grid { grid-template-columns: 1fr; } .research-area { grid-template-columns: 170px minmax(0, 1fr); } }
@media (max-width: 575px) {
  .home-container { padding-top: .4rem; }
  .home-container .profile-hero { grid-template-columns: 105px minmax(0, 1fr); grid-template-areas: "portrait artwork" "intro intro"; gap: 1rem; padding: 1.35rem; text-align: left; }
  .home-container .profile-side { grid-area: portrait; }
  .home-container .profile-photo-wrap { max-width: 105px; }
  .home-container .profile-intro { grid-area: intro; }
  .profile-visual { display: block; grid-area: artwork; }
  .profile-visual img { max-height: 170px; }
  .home-container .social .contact-icons { gap: .6rem; font-size: .9rem; flex-wrap: wrap; }
  .home-container .profile-intro .post-title { font-size: 2rem; }
  .home-container .profile-actions, .home-container .profile-contact { justify-content: flex-start; }
  .home-container .profile-contact { margin-left: 0; margin-right: 0; max-width: none; }
  .home-container .profile-kicker { font-size: .63rem; }
  .home-section-nav { gap: .15rem; }
  .home-section-nav a { font-size: .74rem; padding: .4rem .6rem; }
  .home-container .research-overview h2, .home-container .site-explore h2, .home-container .news h2, .home-container .home-section-heading h2 { font-size: 1.25rem; }
  .home-section-intro { font-size: .87rem; }
  .research-area { grid-template-columns: 1fr; gap: .65rem; padding: 1.2rem; }
  .research-visual { min-height: 0; max-height: 135px; }
  .research-visual img { height: 135px; width: 100%; object-fit: contain; }
  .research-copy p { font-size: .85rem; }
  .home-container .news-scroll-wrap { padding: .4rem .8rem; }
  .home-container .news-scroll { max-height: 16rem; }
  .home-container .news table th { width: 78px; font-size: .7rem; }
  .home-container .news table td { font-size: .81rem; }
  .home-service-grid, .site-explore-grid { grid-template-columns: 1fr; }
  .home-background { padding: .9rem 1rem; }
}
@media (prefers-reduced-motion: reduce) { .research-area, .site-explore-card { transition: none; } }
