:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #fff;
  --ink: #12243c;
  --muted: #45566a;
  --line: #d6d9de;
  --accent: #a51c30;
  --accent-strong: #8c1729;
  --tint: #eaf0f6;
  --hero-glow: #e5edf6;
  --green: #a51c30;
  --shadow: 0 24px 65px #12243c19;
  --body: "Times New Roman", Times, var(--local-serif), "Noto Serif", serif;
  --local-serif: "Songti SC", SimSun;
  --blue-text: #254d78;
  --feature: #132944;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1e1e1e;
  --surface: #282729;
  --ink: #f3f3f1;
  --muted: #c9c5c2;
  --line: #514c4f;
  --accent: #f694a3;
  --accent-strong: #ffb2ba;
  --tint: #293352;
  --hero-glow: #242a3d;
  --green: #f694a3;
  --shadow: 0 24px 65px #11100f80;
  --blue-text: #b0cfef;
  --feature: #293352;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #1e1e1e;
    --surface: #282729;
    --ink: #f3f3f1;
    --muted: #c9c5c2;
    --line: #514c4f;
    --accent: #f694a3;
    --accent-strong: #ffb2ba;
    --tint: #293352;
    --hero-glow: #242a3d;
    --green: #f694a3;
    --shadow: 0 24px 65px #11100f80;
    --blue-text: #b0cfef;
    --feature: #293352;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 98px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.65; }
h1, h2, h3, p, figure { margin: 0; }
:root:lang(ja) { --local-serif: "Hiragino Mincho ProN", "Yu Mincho"; }
:root:lang(ko) { --local-serif: "AppleMyungjo", Batang; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.container { width: min(1200px, calc(100% - 104px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; transform: translateY(-200%); background: var(--surface); padding: .5em 1em; }
.skip-link:focus { transform: none; }
.site-header { position: sticky; z-index: 5; top: 0; background: var(--paper); background: color-mix(in srgb, var(--paper) 91%, transparent); backdrop-filter: blur(16px); border-top: 4px solid #a51c30; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 71px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { color: var(--ink); display: inline-flex; width: max-content; align-items: center; gap: 11px; font-size: 1.2rem; font-weight: 700; letter-spacing: -.025em; }
.brand-mark { width: 37px; height: 37px; border-radius: 2px; display: grid; place-items: center; background: #a51c30; color: #fff8f5; font: 700 .84rem/1 var(--body); letter-spacing: .05em; }
.site-nav, .header-controls { display: flex; align-items: center; gap: 25px; }
.site-nav a { position: relative; padding-block: 24px; font-size: 1rem; color: var(--muted); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent-strong); }
.site-nav a[aria-current]::after { content: ""; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px; background: var(--accent); border-radius: 2px; }
.header-controls { justify-content: end; gap: 9px; }
.language-menu { position: relative; }
.language-menu summary, .icon-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); padding: 0 11px; }
.language-menu summary { list-style: none; font-weight: 700; font-size: .82rem; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu[open] summary, .language-menu summary:hover, .icon-button:hover { border-color: var(--accent); }
.language-menu ul { width: 174px; list-style: none; position: absolute; z-index: 2; inset: calc(100% + 10px) 0 auto auto; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.language-menu a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 7px; font-size: .88rem; }
.language-menu a:is(:hover,[aria-current]) { background: var(--tint); color: var(--accent-strong); }
.language-menu a span { color: var(--muted); font-size: .74rem; }
.globe { position: relative; border: 1px solid currentColor; width: 15px; height: 15px; border-radius: 50%; }
.globe::before { content: ""; position: absolute; inset: -1px 3px; border: 1px solid currentColor; border-radius: 50%; }
.globe::after { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px solid currentColor; }
.chevron { width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-2px) rotate(45deg); }
.icon-button { width: 40px; padding: 0; }
.theme-icon { width: 14px; height: 14px; border-radius: 50%; box-shadow: -4px 2px 0 1px currentColor; transform: translate(2px, -1px); }
.theme-button[aria-pressed="true"] .theme-icon { width: 12px; height: 12px; border: 1.5px solid currentColor; box-shadow: 0 -8px 0 -5px, 0 8px 0 -5px, 8px 0 0 -5px, -8px 0 0 -5px; transform: none; }
.menu-button { display: none; }
.menu-button span, .menu-button span::before, .menu-button span::after { content: ""; width: 15px; height: 1.5px; background: currentColor; border-radius: 2px; }
.menu-button span { position: relative; }
.menu-button span::before, .menu-button span::after { position: absolute; left: 0; }
.menu-button span::before { top: -5px; }
.menu-button span::after { top: 5px; }
.hero { position: relative; isolation: isolate; overflow: clip; background: radial-gradient(ellipse at 82% 43%, var(--hero-glow), transparent 58%); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(var(--blue-text) .75px, transparent .75px); background-size: 19px 19px; opacity: .14; mask-image: linear-gradient(115deg, transparent 28%, #000 77%); }
.hero-grid { min-height: 670px; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.83fr); align-items: center; gap: clamp(35px, 6.4vw, 100px); padding-block: 68px 80px; }
.hero-copy { padding-block: 14px; animation: hero-enter .8s both; }
.eyebrow { color: var(--accent-strong); font-weight: 675; font-size: .84rem; display: flex; align-items: center; gap: 10px; letter-spacing: .09em; text-transform: uppercase; }
.section-mark { display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor; transform: rotate(45deg); margin-inline: 2px 3px; flex: none; }
.hero h1 { font-size: clamp(4.3rem, 8.1vw, 8.5rem); line-height: 1.03; font-weight: 700; letter-spacing: -.055em; margin-block: 20px 8px; }
:lang(zh) .hero h1, :lang(ja) .hero h1 { font-size: clamp(4rem, 7.7vw, 7.8rem); letter-spacing: -.055em; }
.alternate { color: var(--accent-strong); font-family: var(--body); font-size: clamp(1.18rem, 2.2vw, 1.72rem); font-style: italic; }
.hero-intro { margin-top: 29px; max-width: 33rem; color: var(--muted); font-size: clamp(1.13rem, 1.65vw, 1.42rem); line-height: 1.56; }
.hero-interests, .tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.hero-interests { margin-top: 23px; }
.hero-interests li, .tag-list li { color: var(--blue-text); background: var(--tint); padding: 4px 10px; border-radius: 3px; font-size: .82rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 21px; margin-top: 31px; }
.primary-button, .text-button { font-size: .94rem; font-weight: 690; padding: 11px 18px; border-radius: 3px; transition: transform .2s, background .2s; }
.primary-button { background: #a51c30; color: #fff; box-shadow: 0 8px 25px #8c172928; }
.primary-button:hover { transform: translateY(-3px); background: #821526; }
.text-button { padding-inline: 6px; color: var(--accent-strong); }
.text-button:hover { text-decoration: underline; text-underline-offset: 5px; }
.portrait { width: min(100%, 396px); position: relative; justify-self: center; padding: 0 11px 10px 0; animation: hero-enter .9s .12s both; }
.portrait::before { content: ""; position: absolute; z-index: -1; inset: 20px -7px -5px 20px; border: 1px solid var(--accent); border-radius: 3px; transform: rotate(4deg); opacity: .64; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.portrait:hover::before { transform: rotate(7deg); }
.portrait-frame { border-radius: 2px; aspect-ratio: 4 / 4.85; overflow: hidden; background: var(--tint); box-shadow: var(--shadow); }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 64%; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.portrait:hover img { transform: scale(1.035); }
.portrait figcaption { position: absolute; bottom: 28px; right: 29px; display: flex; align-items: center; gap: 8px; color: #fff; background: #132944ee; padding: 7px 11px; backdrop-filter: blur(8px); border: 1px solid #ffffff45; border-radius: 8px; font-size: .82rem; }
.location-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffb2ba; }
.personal-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(18px, 5vw, 60px); padding-block: 25px 33px; border-top: 1px solid var(--line); }
.personal-grid h2 { font-size: clamp(1.28rem, 2.3vw, 1.68rem); line-height: 1.24; }
.personal-grid p { margin-top: 7px; color: var(--muted); max-width: 62ch; }
.personal-grid .hero-interests { margin-top: 10px; }
.section { padding-top: clamp(70px, 9vw, 126px); padding-bottom: clamp(74px, 9vw, 126px); }
.section-heading h2 { margin-top: 13px; max-width: 22ch; font-size: clamp(2.25rem, 4.6vw, 4.2rem); line-height: 1.09; letter-spacing: -.045em; font-weight: 700; overflow-wrap: break-word; }
.section-summary { margin-top: 14px; color: var(--muted); max-width: 51ch; font-size: 1.04rem; }
.research-directions { margin-top: 28px; padding: 21px clamp(16px, 3vw, 30px); border-top: 2px solid var(--accent); background: var(--tint); }
.research-directions h3 { font-size: 1.28rem; }
.research-directions dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 25px; margin: 12px 0 0; }
.research-directions dt { color: var(--blue-text); font-weight: 700; }
.research-directions dd { margin: 2px 0 0; color: var(--muted); }
.filters { margin: 29px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 7px 13px; font-size: .87rem; font-weight: 630; transition: border-color .2s, background .2s; }
.filters button:hover { border-color: var(--accent); }
.filters button[aria-pressed="true"] { background: var(--tint); color: var(--accent-strong); border-color: var(--accent); }
.project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.project { position: relative; display: flex; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--blue-text); border-radius: 2px; transition: box-shadow .24s, border-color .24s; }
.project:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.project-content { position: relative; padding: clamp(22px, 3vw, 36px); display: flex; flex: 1; flex-direction: column; align-items: start; }
.project-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .84rem; font-weight: 680; }
.project-status[data-status="0"] { color: var(--accent-strong); }
.project-status[data-status="0"] span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.project h3, .education-item h3, .update-item h3 { font-size: clamp(1.27rem, 2.5vw, 1.82rem); font-weight: 740; letter-spacing: -.035em; line-height: 1.24; overflow-wrap: anywhere; }
.project h3 { margin-top: 15px; }
.project-subtitle { margin-top: 5px; font-weight: 655; }
.project-description { margin-top: 13px; color: var(--muted); margin-bottom: 19px; }
.tag-list { margin-top: auto; }
.featured { grid-column: 1 / -1; color: #f7f7f2; background: var(--feature); border-color: var(--feature); border-top: 4px solid #a51c30; }
.featured .project-content { flex-basis: 58%; z-index: 1; }
.featured .project-status, .featured .project-description { color: #dce7f0; }
.featured .project-status span { background: #ff9ba9; }
.featured .tag-list li { background: #294664; color: #e9f1fa; }
.featured h3 { font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.06em; }
.sequence-visual { flex: 0 0 39%; min-height: 235px; position: relative; background: radial-gradient(ellipse at center, #25476b, transparent 69%); }
.sequence-visual canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.education-panel { border-block: 1px solid var(--line); background: var(--tint); }
.education-grid { display: grid; grid-template-columns: .83fr 1fr; gap: clamp(32px, 7vw, 90px); }
.education-list { border-top: 1px solid var(--line); }
.education-item { padding: 23px 0; display: grid; gap: 3px; border-bottom: 1px solid var(--line); color: var(--muted); }
.education-item h3 { margin-bottom: 3px; color: var(--ink); }
.education-school { grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 16px; }
.school-logo { display: grid; width: 76px; height: 66px; align-items: center; justify-items: center; padding: 7px; border: 1px solid #d6d9de; background: #fff; border-radius: 2px; transition: border-color .2s; }
.school-logo:hover { border-color: var(--accent); }
.school-logo img { display: block; width: 100%; height: 50px; object-fit: contain; }
.education-item .program { color: var(--ink); }
.period { font-size: .87rem; margin-top: 3px; }
.books-grid { display: grid; grid-template-columns: .83fr 1fr; gap: clamp(24px, 7vw, 90px); }
.book-card { align-self: start; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--accent); padding: clamp(18px, 3vw, 29px); }
.book-status { color: var(--accent-strong); font-weight: 700; }
.book-card h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.38; margin-top: 6px; overflow-wrap: anywhere; }
.book-card p:last-child { margin-top: 8px; color: var(--muted); }
.contact-section { color: #f7f7f2; background: var(--feature); }
.contact-inner { padding-block: clamp(48px, 7vw, 84px); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 25px; }
.contact-inner .eyebrow { color: #ffb2ba; }
.contact-inner .section-summary { color: #dce7f0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 9px; }
.contact-links a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #738aa2; border-radius: 9px; padding: 9px 14px; font-weight: 660; transition: background .2s, transform .2s; }
.contact-links a:hover { background: #294664; transform: translateY(-2px); }
.contact-icon { position: relative; display: inline-grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; }
.icon-email { height: 12px; border: 1.5px solid currentColor; border-radius: 2px; overflow: hidden; }
.icon-email::after { content: ""; position: absolute; width: 11px; height: 11px; top: -6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.icon-orcid { border-radius: 50%; background: #a6ce39; color: #162312; font: 700 10px/1 sans-serif; }
.icon-x::before, .icon-x::after { content: ""; position: absolute; width: 1.5px; height: 16px; border-radius: 1px; background: currentColor; transform: rotate(42deg); }
.icon-x::after { width: 3.5px; border: 1.2px solid currentColor; background: transparent; transform: rotate(-36deg); }
.site-footer { padding-block: 22px; color: var(--muted); font-size: .85rem; }
[data-reveal].is-visible { animation: reveal .55s cubic-bezier(.23,.75,.36,1) both; }
@keyframes hero-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: .5; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 980px) {
  .container { width: calc(100% - 70px); }
  .site-nav { gap: 15px; }
  .header-inner { gap: 14px; }
  .hero-grid { min-height: 590px; gap: 35px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .header-inner { grid-template-columns: 1fr auto; gap: 0; min-height: 61px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; padding: 5px 0 12px; gap: 7px 18px; }
  .site-nav a { padding: 4px 0; }
  .header-controls { grid-row: 1; grid-column: 2; }
  .js .menu-button { display: flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .hero-grid { min-height: 0; padding-block: 46px 62px; grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { padding-block: 0; }
  .hero h1 { font-size: clamp(3.6rem, 12vw, 5.5rem); }
  :lang(zh) .hero h1, :lang(ja) .hero h1 { font-size: clamp(3.6rem, 12vw, 5.5rem); }
  .hero-intro { margin-top: 23px; }
  .portrait { width: min(100% - 10px, 350px); }
  .project-grid, .education-grid, .contact-inner, .personal-grid, .research-directions dl, .books-grid { grid-template-columns: 1fr; }
  .featured { display: grid; }
  .sequence-visual { min-height: 135px; }
}
@media (max-width: 360px) {
  .container { width: calc(100% - 30px); }
  .header-controls { gap: 5px; }
  .brand { gap: 6px; font-size: .98rem; }
  .brand-mark { width: 31px; height: 31px; }
  .header-controls .icon-button { width: 35px; }
  .language-menu summary { gap: 5px; padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  width: fit-content;
  color: var(--accent-strong);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  transition: border-color .2s ease;
}
.detail-link::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; transform: rotate(45deg); }
.detail-link:hover { border-color: var(--accent); }
.detail-page { padding-top: clamp(42px, 6.5vw, 90px); }
.detail-heading { max-width: 760px; margin-bottom: 30px; }
.detail-heading h1 { font-size: clamp(2.9rem, 5.5vw, 5.65rem); letter-spacing: -.05em; line-height: 1.05; margin-top: 11px; overflow-wrap: break-word; }
.detail-heading > p:last-child { font-size: 1.14rem; color: var(--muted); margin-top: 15px; max-width: 63ch; }
.interactive-figure { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--surface); }
.figure-stage {
  min-height: 310px;
  position: relative;
  overflow: hidden;
  color: #f3f3f1;
  background: radial-gradient(ellipse at 58% 45%, #2c4b72, transparent 71%), #162741;
}
.figure-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(#8da6c019 1px, transparent 1px), linear-gradient(90deg, #8da6c019 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 95%);
}
.figure-stage canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.figure-caption { position: absolute; left: 18px; bottom: 13px; font-size: .87rem; color: #dce7f0; }
.figure-content { padding: clamp(20px, 3vw, 36px); }
.figure-content h2, .detail-projects h2, .profile-work h2 { font-size: clamp(1.63rem, 3vw, 2.4rem); line-height: 1.15; }
.figure-controls { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.figure-controls button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-align: start;
  padding: 6px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .95rem;
}
.figure-controls button:hover, .figure-controls button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-strong); }
.figure-controls button[aria-pressed="true"] { background: var(--tint); }
.figure-indicator { width: 6px; height: 6px; border: 1px solid currentColor; transform: rotate(45deg); flex: none; }
.figure-controls button[aria-pressed="true"] .figure-indicator { background: currentColor; }
.figure-panel + .figure-panel { margin-top: 11px; }
.figure-panel p { color: var(--muted); }
.figure-panel h3 { font-size: 1.2rem; line-height: 1.25; margin-bottom: 5px; }
.figure-note { font-style: italic; }
.detail-projects, .detail-schools { margin-top: 48px; }
.subject-tags { margin-top: 12px; }
.profile-detail { display: grid; grid-template-columns: minmax(0, .55fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 64px); margin: 0 0 38px; align-items: center; }
.profile-detail > img { width: 100%; max-width: 265px; height: auto; aspect-ratio: 4 / 4.3; object-fit: cover; object-position: center 67%; border-bottom: 3px solid var(--accent); }
.profile-work article p { margin-top: 10px; color: var(--muted); max-width: 62ch; }
.profile-meta { margin-top: 16px; color: var(--accent-strong); }
@media (max-width: 760px) {
  .interactive-figure, .profile-detail { grid-template-columns: 1fr; }
  .figure-stage { min-height: 205px; }
  .profile-detail > img { max-width: 205px; }
}
