/* Optional interactive theme. The original jemdoc stylesheet stays intact. */
.tech-theme {
  --tech-ink: #16365d;
  --tech-blue: #386ce0;
  --tech-cyan: #65ddeb;
  background: #f1f5fb;
  background-image: radial-gradient(ellipse at 80% 0, #dfeafb 0, transparent 55%);
  color: #27364a;
}
.tech-theme table#tlayout { max-width: 1280px; margin: 30px auto; border-collapse: separate; border-spacing: 0; border: 1px solid #dce5f1; border-radius: 14px; box-shadow: 0 12px 50px #16365d0c; }
.tech-theme #layout-menu { width: 172px; background: radial-gradient(ellipse at 0 0, #f5faff 0, transparent 420px), linear-gradient(180deg, #e3eefb, #edf3fa); border: 0; border-right: 1px solid #d5e2f1; border-radius: 13px 0 0 13px; padding: 24px 14px; }
.tech-theme .site-nav { isolation: isolate; }
/* Official Beihang emblem: https://www.buaa.edu.cn/xygk/jrbh/bhxh.htm */
.tech-theme .site-nav::after { content: ""; display: block; width: 140px; height: 140px; max-width: 100%; margin: 34px auto 0; border-radius: 50%; background: url("photos/beihang-emblem.jpg") center / contain no-repeat; opacity: 0.18; mix-blend-mode: multiply; pointer-events: none; }
.tech-theme .menu-category { color: #244a73; border-color: #c8d9ed; padding-bottom: 20px; }
.tech-theme #layout-menu a { color: #395979; border: 1px solid transparent; transition: background 180ms, color 180ms, border-color 180ms; }
.tech-theme #layout-menu a:hover { color: #184b7c; background: #ffffffa6; border-color: #bfd3ea; }
.tech-theme #layout-menu a.current { background: #ffffffdb; color: #174c81; border-color: #c3d6ed; box-shadow: inset 2px 0 #4a8ac6, 0 3px 12px #315c8b0a; }
.tech-theme #layout-content { padding: 30px 32px; border-radius: 0 13px 13px 0; }
.tech-theme #layout-content > h2 { color: var(--tech-ink); margin-top: 1.4rem; border-color: #dce6f3; }
.tech-theme a { transition: color 160ms; }
.tech-theme a:focus-visible, .tech-theme button:focus-visible { outline: 2px solid #447ddd; outline-offset: 4px; }
.tech-theme a:hover { color: #235bc2; }
.reading-progress { position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #4770ec, #51cbe0); transform: scaleX(0); transform-origin: left; pointer-events: none; }

.profile-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 28px 30px 30px;
  border: 1px solid #2e5586;
  border-radius: 10px;
  background: radial-gradient(ellipse at 100% 0, #285179 0, transparent 65%), linear-gradient(125deg, #12223e, #142d50);
  color: #e4eefb;
  box-shadow: 0 12px 28px #16365d17;
}
.profile-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(#8bb9ed08 1px, transparent 1px), linear-gradient(90deg, #8bb9ed08 1px, transparent 1px); background-size: 32px 32px; }
.profile-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(320px circle at var(--pointer-x, 80%) var(--pointer-y, 10%), #60ccfa1c, transparent 75%); z-index: -1; }
.network-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0.65; }
.profile-content { position: relative; }
.profile-kicker, .section-kicker { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.profile-kicker { color: #99cce9; margin: 0 0 10px; }
.tech-theme .profile-panel #toptitle { border: 0; padding: 0; margin: 0 0 24px; }
.tech-theme .profile-panel #toptitle h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3vw, 2.25rem); font-weight: bold; line-height: 1.3; }
.profile-panel h1 span { display: inline-block; font-size: inherit; font-weight: inherit; color: inherit; }
.profile-panel h1 .name-separator { margin: 0 0.15em; color: #bad3f1; }
.profile-panel a { color: #b5d7ff; }
.profile-panel a:hover { color: #fff; }
.profile-panel a:focus-visible { outline-color: #82dcff; }
.profile-intro { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; }
.profile-portrait img { display: block; width: 100%; max-width: 180px; height: auto; border: 1px solid #85b9ed7a; border-radius: 7px; box-shadow: 0 0 24px #62aff52e; }
.profile-bio { min-width: 0; }
.profile-bio p { margin-bottom: 0.85em; font-size: 1rem; line-height: 1.7; }
.profile-bio p > strong { font-size: 1.125rem; color: #fff; }
.profile-panel .profile-links { gap: 8px; }
.profile-panel .profile-links a { border: 1px solid #78a7dd59; padding: 5px 11px; border-radius: 4px; background: #1d3a5d; }
.profile-panel .profile-links a:hover { background: #2b5078; text-decoration: none; }
.about-section { margin-top: 1.4rem; scroll-margin-top: 24px; }
.about-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 0.65em; padding-bottom: 8px; border-bottom: 1px solid #dce6f3; }
.tech-theme .about-header h2 { margin: 0; padding: 0; border: 0; color: var(--tech-ink); }
.bio-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid #cbd9ec; border-radius: 6px; background: #f2f6fc; }
.bio-tabs[hidden], .bio-panel[hidden], .about-section[data-language] .bio-fallback-title { display: none; }
.bio-tabs button { border: 1px solid transparent; border-radius: 4px; padding: 5px 11px; background: transparent; color: #456181; font: 0.875rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; cursor: pointer; }
.bio-tabs button[aria-selected="true"] { border-color: #b9cce7; background: #fff; color: #1d4678; box-shadow: 0 1px 4px #16365d10; }
.bio-tabs button:hover { color: #16365d; background: #e7effb; }
.bio-panel[lang="zh-CN"] p { line-height: 1.9; }
.bio-panel:focus-visible { outline: 2px solid #447ddd; outline-offset: 4px; }
.effects-toggle { width: 100%; margin-top: 28px; padding: 9px 10px; border: 1px solid #afc8e2; border-radius: 5px; color: #3a5d80; background: #ffffff66; font: 0.875rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; cursor: pointer; }
.effects-toggle:hover { color: #184b7c; border-color: #7da5cc; background: #ffffffb3; }
.effects-toggle[hidden], .back-to-top[hidden] { display: none; }

.news-section { position: relative; isolation: isolate; margin: 2rem 0; padding: 24px 24px 8px; border: 1px solid #b9cdea; border-radius: 9px; background: #f6f9ff; box-shadow: 0 7px 25px #305ca60a; }
.news-section::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(320px circle at var(--pointer-x, 0%) var(--pointer-y, 0%), #78afff20, transparent 80%); }
.news-section::after { content: ""; position: absolute; pointer-events: none; inset: -1px; border: 1px solid transparent; border-top-color: #4879d3; border-left-color: #4d97ca; border-radius: inherit; opacity: 0.8; }
.news-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #cbdcf2; }
.section-kicker { color: #637da0; margin: 0 0 2px; letter-spacing: 0.09em; }
.tech-theme #layout-content .news-header h2#news { border: 0; margin: 0; padding: 0; color: #1d4678; font-size: 1.65rem; }
.news-research-link { color: #3c65a6; font: 0.875rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: nowrap; padding: 8px 0; }
.tech-theme div.infoblock.news-block { margin-top: 8px; }
.tech-theme div.infoblock.news-block > div.blockcontent { border: 0; background: transparent; padding: 0; }
.tech-theme .news-block > .blockcontent > ul { list-style: none; padding-left: 0; }
.tech-theme .news-block > .blockcontent > ul > li { position: relative; padding: 10px 12px; border-bottom: 1px solid #e1e9f5; transition: background 180ms; }
.tech-theme .news-block > .blockcontent > ul > li:last-child { border: 0; }
.tech-theme .news-block > .blockcontent > ul > li:hover { background: #eaf2ff; border-radius: 5px; }
.tech-theme .news-block li p { margin-bottom: 0; }
.tech-theme .news-block li.news-latest { padding: 14px 12px 14px 16px; border-top: 0; background: #edf4ff; }
.tech-theme .news-block li.news-latest::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(#376bd5, #51b9ce, #376bd5); background-size: 100% 200%; animation: news-light 5s linear infinite; }
.tech-theme .news-block li.news-latest p > strong:first-child { padding: 2px 7px; background: #254e84; color: #fff; font-size: 0.875rem; margin: 0 5px 2px 0; }
.tech-theme .news-block li:not(.news-latest) p > strong:first-child { color: #58708e; }
.tech-theme .news-archive { margin: 12px 12px 0; border-color: #d5e2f3; }
.tech-theme .news-archive summary { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 0.875rem; }
@keyframes news-light { to { background-position: 0 200%; } }

.tech-theme .publication-list > li { border-radius: 5px; transition: background 180ms; }
.tech-theme .publication-list > li:hover { background: #f2f6fd; }
.tech-theme .publication-list > li:target { background: #edf4ff; outline-color: #edf4ff; }
.tech-theme .publication-nav a { background: #f6f9fe; transition: border-color 180ms, box-shadow 180ms; }
.tech-theme .publication-nav a:hover { border-color: #91b5eb; box-shadow: 0 0 14px #82ade52b; }
.team-section { margin: 1.4rem 0; }
.tech-theme .team-section h2 { margin-top: 6px; padding-bottom: 12px; color: var(--tech-ink); border-color: #dce6f3; }
.team-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; margin-top: 24px; }
.team-photo { margin: 0; min-width: 0; border: 1px solid #d9e4f2; border-radius: 9px; overflow: hidden; background: #f6f9ff; }
.team-photo-featured { grid-column: 1 / -1; }
.team-photo > a { position: relative; display: block; border: 0; cursor: zoom-in; }
.team-photo img { display: block; width: 100%; height: auto; }
.photo-expand { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border: 1px solid #ffffff50; border-radius: 4px; background: #12233ee6; color: #fff; font: 0.875rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; transition: background 160ms; }
.team-photo a:hover .photo-expand, .team-photo a:focus-visible .photo-expand { background: #245a8f; }
.team-photo a:focus-visible { outline-offset: -4px; }
.team-lightbox { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); width: max-content; padding: 16px; border: 1px solid #577395; border-radius: 10px; background: #10213a; color: #edf5ff; box-shadow: 0 24px 80px #0008; }
.team-lightbox::backdrop { background: #071322e8; }
.team-lightbox[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.team-lightbox form { margin: 0; align-self: flex-end; }
.lightbox-close { padding: 7px 16px; background: #203d65; border: 1px solid #7396bd; border-radius: 4px; color: #fff; cursor: pointer; font: 1rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.team-lightbox > img { display: block; max-width: 100%; max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; min-height: 0; }
html:has(.team-lightbox[open]) { overflow: hidden; }
.back-to-top { position: fixed; z-index: 10; right: 20px; bottom: 20px; padding: 9px 14px; border: 1px solid #bbcde5; border-radius: 6px; background: #f9fbfff5; box-shadow: 0 3px 14px #16365d10; font: 0.875rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.fx-reveal { opacity: 0; transform: translateY(14px); transition: opacity 550ms ease, transform 550ms ease; transition-delay: var(--reveal-delay, 0ms); }
.tech-theme .publication-list > li.fx-reveal { transition: background 180ms, opacity 550ms ease, transform 550ms ease; }
.fx-reveal.is-visible, .fx-reveal:focus-within { opacity: 1; transform: none; }
html[data-effects="off"] .fx-reveal { opacity: 1; transform: none; transition: none; }
html[data-effects="off"] .news-latest::before { animation: none; }
html[data-effects="off"] .fx-panel::after, html[data-effects="off"] .news-section::before { background: none; }

@media (max-width: 1050px) {
  .tech-theme #layout-content { padding: 24px; }
  .profile-panel { padding: 24px; }
}
@media (min-width: 761px) and (max-width: 950px) {
  .profile-intro { grid-template-columns: 180px minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 760px) {
  .tech-theme table#tlayout { margin: 0; border: 0; border-radius: 0; }
  .tech-theme #layout-menu { width: 100%; padding: 14px 18px; border-radius: 0; }
  .tech-theme .site-nav { position: relative; top: 0; }
  .tech-theme .site-nav::after { position: absolute; z-index: -1; right: 6px; top: -4px; width: 112px; height: 112px; margin: 0; opacity: 0.1; }
  .tech-theme .menu-category { padding-bottom: 5px; }
  .tech-theme #layout-menu a { padding: 7px 9px; }
  .tech-theme #layout-content { border-radius: 0; padding: 22px; }
  .effects-toggle { width: auto; margin: 0 0 0 auto; padding: 7px 9px; }
  .news-section { padding: 20px 18px 8px; }
}
@media (max-width: 620px) {
  .profile-intro { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .profile-portrait img { width: min(100%, 170px); }
  .team-gallery { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .team-lightbox { padding: 10px; }
}
@media (max-width: 540px) {
  .tech-theme #layout-content { padding: 16px; }
  .profile-panel { padding: 22px 20px; }
  .tech-theme .profile-panel #toptitle h1 { font-size: clamp(1.15rem, 5.6vw, 1.8rem); }
  .profile-kicker { font-size: 0.875rem; letter-spacing: 0.06em; }
  .news-header { gap: 10px; }
  .section-kicker { letter-spacing: 0.04em; }
  .news-research-link { white-space: normal; text-align: right; }
  .tech-theme .news-block > .blockcontent > ul > li { padding-left: 4px; padding-right: 4px; }
  .tech-theme .news-block li.news-latest { padding-left: 12px; padding-right: 8px; }
  .back-to-top { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tech-theme *, .tech-theme *::before, .tech-theme *::after { animation: none !important; transition: none !important; }
  .fx-reveal { opacity: 1; transform: none; }
}
@media print {
  .tech-theme { background: white; }
  .tech-theme table#tlayout { border: 0; box-shadow: none; }
  .tech-theme #layout-content { padding: 0; }
  .effects-toggle, .reading-progress, .back-to-top, .network-canvas, .profile-panel::before, .profile-panel::after, .news-section::before, .news-section::after { display: none; }
  .profile-panel { background: #fff; color: #27364a; box-shadow: none; border-color: #c0c0c0; }
  .tech-theme .profile-panel #toptitle h1, .profile-panel h1 span, .profile-panel a, .profile-kicker, .profile-bio p > strong { color: #16365d; }
  .profile-panel .profile-links a { background: white; }
  .fx-reveal { opacity: 1; transform: none; }
  .news-section { box-shadow: none; break-inside: auto; }
  .photo-expand, .team-lightbox { display: none; }
  .team-photo { break-inside: avoid; }
}
