:root {
  color-scheme: light;
  --paper: #f8f9fd;
  --white: #fff;
  --ink: #15182e;
  --muted: #50566e;
  --blue: #3030c9;
  --blue-dark: #232687;
  --line: #e1e4f1;
  --night: #141733;
  --lime: #def477;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, p, figure, dl,dd { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(1260px, calc(100% - 96px)); margin-inline: auto; }
section[id], article[id] { scroll-margin-top: 1.35rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed;
  z-index: 10;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  border-radius: .5rem;
  color: white;
  background: var(--blue);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-inner { min-height: 73px; }
.wordmark { display: inline-flex; align-items: center; gap: .67rem; font-size: 1.15rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.wordmark-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue);
}
.wordmark-icon::before {
  content: "";
  width: 16px;
  height: 10px;
  border: 1.6px solid white;
  border-radius: 50%;
  transform: rotate(-38deg);
}
.wordmark-icon::after { content: ""; position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.navigation { display: flex; align-items: center; gap: clamp(.8rem, 3.2vw, 2.4rem); }
.navigation a, .footer a { padding-block: .65rem; color: var(--muted); font-size: .93rem; font-weight: 680; text-decoration: none; white-space: nowrap; }
.navigation a:hover, .footer a:hover { color: var(--blue); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.45rem);
  padding-block: clamp(3rem, 6.8vw, 6.25rem) clamp(3.25rem, 7vw, 6.7rem);
}
.eyebrow { color: var(--blue-dark); font-size: .92rem; font-weight: 800; line-height: 1.5; }
.hero h1 {
  display: grid;
  justify-items: start;
  gap: .015em;
  margin-top: clamp(.85rem, 2vw, 1.5rem);
  font-size: clamp(3rem, 6.65vw, 6.25rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.075em;
}
.hero h1 span { white-space: nowrap; }
.title-accent { position: relative; isolation: isolate; color: var(--blue); }
.title-accent::after { content: ""; position: absolute; z-index: -1; inset: auto 3% .02em 1%; height: .16em; border-radius: 4px; background: var(--lime); transform: rotate(-1.3deg); }
.hero-description { margin-top: 1.55rem; max-width: 30rem; color: var(--muted); font-size: clamp(1.02rem, 1.8vw, 1.24rem); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.button {
  display: inline-flex;
  min-height: 47px;
  padding: .68rem .93rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: .66rem;
  font-size: .94rem;
  font-weight: 760;
  text-decoration: none;
}
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); }
.button-outline { background: #fff; border-color: #d1d5ea; color: var(--ink); }
.button-outline:hover { border-color: var(--blue); color: var(--blue); }

.material-figure {
  min-width: 0;
  overflow: hidden;
  padding: clamp(1.15rem, 3vw, 2.3rem);
  border: 1px solid #2e3770;
  border-radius: clamp(1.15rem, 2.6vw, 1.8rem);
  color: white;
  background: radial-gradient(ellipse at 60% 40%, #242a6e, transparent 72%), #141733;
  box-shadow: 0 19px 42px #29275124;
}
.material-heading { display: flex; gap: .6rem 1rem; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
.material-heading strong { font: 750 clamp(1.9rem, 3.75vw, 3.6rem)/1.18 "Segoe UI", Arial, sans-serif; letter-spacing: -.05em; }
.material-heading sub { font-size: .52em; }
.material-heading span, .material-footer figcaption { color: #d7dbfc; font-size: .92rem; }
.layer-stack { position: relative; height: clamp(11.7rem, 20vw, 17.2rem); margin-block: .45rem 1.65rem; perspective: 650px; isolation: isolate; }
.plane {
  --plane-color: #8fa6f8;
  position: absolute;
  top: calc(6% + var(--layer-depth) * 13.8%);
  left: 17%;
  width: 66%;
  height: 38%;
  border: 1.4px solid var(--plane-color);
  border-radius: .55rem;
  opacity: .60;
  background:
    radial-gradient(circle, currentColor 1px, transparent 2px) 0 0 / 21px 21px,
    linear-gradient(90deg, #9ba8fd35 1px, transparent 1px) 0 0 / 21px 21px,
    linear-gradient(#9ba8fd35 1px, transparent 1px) 0 0 / 21px 21px,
    #17215043;
  color: var(--plane-color);
  transform: rotate(-11deg) skewX(-34deg) scaleY(.61);
  transition: opacity .2s, filter .2s;
}
.plane:nth-child(1) { --layer-depth: 0; }
.plane:nth-child(2) { --layer-depth: 1; }
.plane:nth-child(3) { --layer-depth: 2; }
.plane:nth-child(4) { --layer-depth: 3; }
.plane:nth-child(5) { --layer-depth: 4; }
.plane-inner { --plane-color: #bcabff; }
.plane-center { --plane-color: #def477; }
.layer-stack[data-layer="outer"] .plane-outer,
.layer-stack[data-layer="inner"] .plane-inner,
.layer-stack[data-layer="center"] .plane-center {
  z-index: 1;
  opacity: 1;
  box-shadow: 0 0 1.25rem #5e68e887;
  filter: brightness(1.23);
}
.material-footer { display: flex; gap: .6rem 1rem; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.layer-controls, .kondo-controls, .filter-list, .state-buttons { display: flex; flex-wrap: wrap; gap: .42rem; }
.layer-controls button, .kondo-controls button, .filter-list button, .state-buttons button {
  min-height: 38px;
  padding: .33rem .72rem;
  border: 1px solid #d7daf0;
  border-radius: .55rem;
  color: #343658;
  background: #fff;
  font-size: .88rem;
  font-weight: 740;
}
.layer-controls button { color: #f1f2ff; background: #2a3056; border-color: #4d527c; }
.layer-controls button[aria-pressed="true"] { color: #172044; background: var(--lime); border-color: var(--lime); }
.layer-controls button:focus-visible { outline-color: #fff; }
.kondo-controls button[aria-pressed="true"], .filter-list button[aria-pressed="true"], .state-buttons button[aria-pressed="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.kondo-controls button:hover, .filter-list button:hover, .state-buttons button:hover { border-color: var(--blue); }

.section-heading {
  display: flex;
  gap: .8rem 2rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: clamp(1rem, 2.7vw, 1.7rem);
}
.section-heading h2, .kagome-copy h2, .about h2 {
  font-size: clamp(2rem, 4.25vw, 3.55rem);
  line-height: 1.16;
  font-weight: 880;
  letter-spacing: -.06em;
}
.featured { margin-bottom: clamp(3.8rem, 8vw, 7rem); }
.publications { margin-bottom: clamp(3.8rem, 8vw, 7rem); }
.publication-list { border-top: 1px solid var(--line); }
.publication {
  max-width: 65rem;
  padding-block: clamp(1.1rem, 2.5vw, 1.65rem);
  border-bottom: 1px solid var(--line);
}
.publication-type { margin-bottom: .33rem; color: var(--blue-dark); font-size: .9rem; font-weight: 760; }
.publication h3 {
  max-width: 56rem;
  margin-bottom: .42rem;
  font-size: clamp(1.19rem, 2.25vw, 1.62rem);
  line-height: 1.32;
  letter-spacing: -.023em;
  overflow-wrap: anywhere;
}
.publication-authors, .publication-venue { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.publication-authors strong { color: var(--ink); }
.publication-venue { margin-top: .19rem; }
.publication-links { display: flex; flex-wrap: wrap; gap: .3rem 1.03rem; }
.education-page-intro {
  padding-block: clamp(2.5rem, 6.2vw, 5.6rem) clamp(1.3rem, 3.2vw, 2.45rem);
}
.education-page-intro h1 {
  margin-top: .55rem;
  font-size: clamp(2.05rem, 5.25vw, 4rem);
  line-height: 1.17;
  font-weight: 880;
  letter-spacing: -.05em;
}
.education-page-meta { margin-top: .72rem; color: var(--muted); font-size: 1rem; }
.undergraduate-album {
  --album-gap: clamp(.8rem, 2vw, 1.35rem);
  margin-bottom: clamp(3rem, 6.5vw, 5.4rem);
}
.album-hint { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.album-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: clamp(1.6rem, 3.5vw, 2.7rem);
}
.album-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .48rem .9rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--white);
  color: var(--blue-dark);
  font-size: .93rem;
  font-weight: 720;
  text-decoration: none;
}
.album-nav a:hover { border-color: var(--blue); }
.album-group + .album-group {
  margin-top: clamp(2rem, 4.6vw, 3.65rem);
  padding-top: clamp(1.65rem, 3.75vw, 2.85rem);
  border-top: 1px solid var(--line);
}
.album-group h3 {
  margin-bottom: var(--album-gap);
  font-size: clamp(1.42rem, 3.1vw, 2.2rem);
  font-weight: 830;
  line-height: 1.25;
  letter-spacing: -.04em;
}
.album-feature, .album-grid { display: grid; gap: var(--album-gap); }
.album-feature { grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); }
.album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.album-feature + .album-grid { margin-top: var(--album-gap); }
@media (min-width: 981px) {
  #lab-photos .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.album-photo {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
}
.album-photo[id] { scroll-margin-top: 1.35rem; }
.album-photo a {
  display: block;
  overflow: hidden;
  border-radius: calc(1rem - 1px) calc(1rem - 1px) 0 0;
  background: #edf0f8;
  cursor: zoom-in;
}
.album-photo img { display: block; width: 100%; height: auto; }
.album-grid img { aspect-ratio: 4 / 3; object-fit: contain; }
.album-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem .6rem;
  padding: .72rem clamp(.7rem, 1.6vw, 1.05rem);
  font-size: .95rem;
  line-height: 1.45;
}
.album-photo time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.album-photo a:hover + figcaption strong { color: var(--blue); }
.undergraduate-records { margin-bottom: clamp(3.8rem, 8vw, 7rem); }
.records-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(.8rem, 2.25vw, 1.35rem);
}
.record-card {
  min-width: 0;
  padding: clamp(1.1rem, 2.8vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 1.07rem;
  background: var(--white);
}
.record-card h3 { font-size: clamp(1.16rem, 2vw, 1.45rem); font-weight: 800; }
.grade-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .63rem;
  margin-top: .85rem;
}
.grade-metrics > div { padding: .67rem .72rem; border-radius: .58rem; background: #eeedff; }
.grade-metrics dt { color: var(--blue-dark); font-size: .88rem; font-weight: 730; }
.grade-metrics dd { color: var(--blue); font-size: clamp(1.32rem, 2.7vw, 1.92rem); font-weight: 850; white-space: nowrap; }
.grade-metrics dd span { margin-left: .28rem; color: var(--muted); font-size: .87rem; font-weight: 720; }
.record-note { margin: .5rem 0 .93rem; color: var(--muted); font-size: .88rem; }
.course-table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.45; }
.course-table caption { padding-block: .45rem; color: var(--ink); text-align: left; font-weight: 770; }
.course-table th, .course-table td { padding: .36rem .25rem; border-bottom: 1px solid var(--line); text-align: left; }
.course-table th[scope="row"] { font-weight: 590; }
.course-table td { padding-left: .7rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.course-table thead th { color: var(--muted); font-size: .88rem; }
.course-group th { padding-top: .72rem; color: var(--blue-dark); font-size: .88rem; }
.honors-record { background: #f5f8ed; border-color: #e0e7d5; }
.award-list { margin: .78rem 0 0; padding: 0; list-style: none; }
.award-list li { padding-block: .59rem; }
.award-list li + li { border-top: 1px solid #e0e7d5; }
.award-list strong { display: block; line-height: 1.45; }
.award-list p { margin-top: .13rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(1.8rem, 5.2vw, 4.2rem);
  padding: clamp(1.5rem, 4.8vw, 3.8rem);
  border: 1px solid #dadff3;
  border-radius: 1.35rem;
}
.feature + .feature { margin-top: clamp(.95rem, 2.8vw, 1.5rem); }
.feature-nickelate { background: #eef0ff; }
.feature-kondo { background: #fff0eb; border-color: #f1dad3; }
.feature-kondo .eyebrow, .feature-kondo .work-steps dt { color: #9c3b2c; }
.feature h3 { margin: .55rem 0 .7rem; font-size: clamp(1.9rem, 4vw, 3.3rem); line-height: 1.17; font-weight: 880; letter-spacing: -.058em; text-wrap: balance; }
.feature h3 span { white-space: nowrap; }
.feature-question { color: #454a66; font-size: clamp(1.05rem, 1.85vw, 1.18rem); line-height: 1.8; }
.method-tags { display: flex; flex-wrap: wrap; gap: .42rem; padding: 0; margin: 1.1rem 0 0; list-style: none; }
.method-tags li { padding: .25rem .58rem; border: 1px solid #ccd0f3; border-radius: .5rem; color: #38339b; font-size: .88rem; font-weight: 700; }
.work-steps { display: grid; gap: .9rem; }
.feature-copy .work-steps { margin-top: 1.15rem; }
.work-steps div { padding-left: .85rem; border-left: 2px solid #9297ec; }
.feature-kondo .work-steps div { border-left-color: #e49985; }
.work-steps dt { margin-bottom: .2rem; color: var(--blue-dark); font-weight: 800; }
.work-steps dd { color: var(--muted); font-size: 1rem; line-height: 1.68; }

.kondo-figure {
  min-width: 0;
  overflow: hidden;
  padding: clamp(.9rem, 2.2vw, 1.45rem);
  border: 1px solid #f3dad4;
  border-radius: 1.02rem;
  background: white;
}
.kondo-figure h4 { margin-bottom: .65rem; font-size: 1.13rem; font-weight: 800; letter-spacing: -.015em; }
.kondo-figure canvas { display: block; width: 100%; aspect-ratio: 2.08; min-height: 153px; border-radius: .66rem; background: #faf7fb; }
.kondo-controls { margin-block: .72rem .55rem; }
.kondo-figure figcaption { color: var(--ink); font-size: .94rem; line-height: 1.65; }
.plot-note { margin-top: .25rem; color: var(--muted); font-size: .87rem; line-height: 1.6; }

.projects { margin-bottom: clamp(3.8rem, 8vw, 7rem); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.7rem, 2vw, 1.15rem); }
.project-card {
  min-width: 0;
  padding: clamp(1.1rem, 2.5vw, 1.85rem);
  border: 1px solid #e0e5d9;
  border-radius: 1.07rem;
  background: #f0f7e9;
}
.project-card[data-category="model"] { background: #eeedff; border-color: #dedcf9; }
.project-card[data-category="method"] { background: #fdf0e8; border-color: #f0e2d8; }
.project-card:last-child { grid-column: 1 / -1; }
.project-card .project-tag { margin-bottom: .34rem; color: #435838; font-size: .875rem; font-weight: 780; }
.project-card[data-category="model"] .project-tag { color: var(--blue-dark); }
.project-card[data-category="method"] .project-tag { color: #8d4529; }
.project-card h3 { margin-bottom: .37rem; font-size: clamp(1.2rem, 2.35vw, 1.66rem); line-height: 1.25; font-weight: 820; letter-spacing: -.026em; }
.project-card p { max-width: 41rem; color: var(--muted); font-size: 1rem; line-height: 1.72; }
.text-link { display: inline-block; margin-top: .65rem; color: var(--blue-dark); font-size: .91rem; font-weight: 800; text-underline-offset: .22em; }

.kagome-section {
  display: grid;
  grid-template-columns: minmax(0, .79fr) minmax(0, 1.21fr);
  align-items: center;
  gap: clamp(1.45rem, 5vw, 4rem);
  padding: clamp(1.4rem, 5vw, 4rem);
  border-radius: 1.45rem;
  color: white;
  background: radial-gradient(ellipse at 9% 100%, #4740ea, transparent 65%), #2924bb;
}
.kagome-copy .eyebrow { color: var(--lime); }
.kagome-copy h2 { margin-block: .55rem .88rem; }
.kagome-copy p { max-width: 26rem; color: #f1efff; font-size: 1rem; line-height: 1.75; }
.kagome-copy .model-note { margin-top: .7rem; color: #e0dcff; font-size: .89rem; }
.kagome-card { min-width: 0; overflow: hidden; border: 1px solid #ffffff45; border-radius: 1.03rem; color: var(--ink); background: white; }
.kagome-canvas { display: block; width: 100%; min-height: 185px; aspect-ratio: 1.85; background: var(--night); }
.kagome-panel { padding: clamp(.85rem, 1.8vw, 1.3rem); }
.model-reading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .24rem .7rem; align-items: center; margin-top: .65rem; color: var(--muted); font-size: .91rem; line-height: 1.6; }
.model-reading strong { color: var(--blue); font-size: 1.5rem; font-weight: 820; font-variant-numeric: tabular-nums; }
.model-reading p { grid-column: 1 / -1; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: start;
  gap: clamp(1.65rem, 5vw, 4.25rem);
  margin-bottom: clamp(3.9rem, 7.5vw, 6.5rem);
}
.about .eyebrow { margin-bottom: .4rem; }
.about h2 span { color: var(--blue); font-size: .72em; white-space: nowrap; }
.profile-copy p:not(.eyebrow) {
  max-width: 38rem;
  margin-top: .75rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.13rem);
  line-height: 1.78;
}
.profile-actions { margin-top: 1.05rem; }
.profile-details {
  min-width: 0;
  padding: clamp(1.1rem, 2.7vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 1.07rem;
  background: var(--white);
}
.profile-details h3 { margin-bottom: .75rem; font-size: 1.14rem; }
.education-list > div + div { margin-top: .75rem; padding-top: .72rem; border-top: 1px solid var(--line); }
.education-list dt { color: var(--blue-dark); font-size: .9rem; font-weight: 740; }
.education-list dd p { margin-top: .12rem; font-weight: 750; }
.education-list .education-date { color: var(--muted); font-size: .88rem; font-weight: 630; }
.school-link { text-underline-offset: .21em; }
.school-link:hover { color: var(--blue); }
.profile-email {
  display: inline-block;
  max-width: 100%;
  margin-top: .21rem;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-underline-offset: .21em;
}
.profile-email:hover { color: var(--blue); }
.footer { min-height: 79px; margin-top: clamp(3.5rem, 6.5vw, 5rem); border-top: 1px solid var(--line); }
.footer span { font-weight: 800; }

@media (max-width: 980px) {
  .wrap { width: calc(100% - 58px); }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 740px) {
  .wrap { width: calc(100% - 34px); }
  .header-inner { min-height: 62px; gap: .58rem; }
  .wordmark { font-size: 1rem; gap: .4rem; }
  .wordmark-icon { width: 28px; height: 28px; border-radius: 7px; }
  .wordmark-icon::after { top: 6px; right: 6px; }
  .navigation { gap: clamp(.42rem, 2.2vw, .95rem); }
  .navigation a { font-size: .875rem; }
  .hero, .feature, .kagome-section, .about, .project-grid, .records-grid { grid-template-columns: 1fr; }
  .hero { gap: 1.55rem; padding-block: 2.8rem 3.75rem; }
  .hero h1 { font-size: clamp(3.1rem, 10vw, 4.65rem); }
  .hero-description { margin-top: 1.05rem; }
  .hero-actions { margin-top: 1.15rem; }
  .layer-stack { height: clamp(11rem, 45vw, 16rem); }
  .section-heading { align-items: start; flex-direction: column; }
  .album-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-nav a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .album-feature { grid-template-columns: minmax(0, 1fr); }
  .album-feature figure:nth-child(2) img { width: min(100%, 23rem); margin-inline: auto; }
  .feature { gap: 1.35rem; }
  .kagome-section { gap: 1.2rem; }
  .about { gap: .75rem; }
}

@media (max-width: 370px) {
  .wrap { width: calc(100% - 26px); }
  .wordmark-icon { display: none; }
  .hero h1 { font-size: 2.73rem; }
  .hero-actions { gap: .45rem; }
  .button { padding-inline: .62rem; }
  .feature, .kagome-section { padding-inline: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plane { transition: none; }
}

