/* Global border-box: width includes padding/borders so 100% never overflows. */
*, *::before, *::after { box-sizing: border-box; }

/* Self-hosted Inter (latin) — pretty and highly legible. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-700.woff2") format("woff2");
}

/* Layout follows the style of Jiajun Wu's academic homepage. */
header {
  width: 100%;
  height: 50px;
  margin-top: 0;
  text-align: center;
  background-color: #003366;
  position: fixed;
  top: 0;
  z-index: 2;
}

body {
  margin: auto;
  padding: 0;
  color: #000;
  background: #fff;
  font-family: "Inter", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 165%;
  text-align: justify;
  font-weight: 400;
}
html, body { overflow-x: hidden; }

h1, h2, h3, h4, h5, h6, .title, span.title, .ftheader, span.venue, span.highlight {
  font-weight: 600;
}
/* Section headers: prominent band with shaded background. */
.content > .title {
  font-size: 1.4em;
  background: #eef2f7;
  border-left: 4px solid #003366;
  padding: 7px 14px;
  border-radius: 4px;
  margin: 0 0 12px;
  color: #0f3460;
}
/* Publication titles stay smaller than section headers. */
.publication .title { font-size: 1.02em; }
/* Hero column titles (e.g. Research Communities). */
.heading .text .title { font-size: 1.15em; }
h1, h2 { margin-bottom: 1.2em; }
h3 { margin-bottom: 0.6em; }

ul, ol, dl {
  float: left;
  margin: 0;
  padding: 5px 10px 6px 30px;
  width: calc(100% - 30px);
}

/* Center the nav row in the middle of the blue bar. */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  height: 50px;
}
.header-inner .ftheader { float: none; padding: 0; font-size: 1.45em; }
.header-inner .ftsubheader { float: none; padding: 0 10px; font-size: 1.15em; }

img.img_responsive, video.img_responsive { width: 100%; height: auto; display: block; }

.container a:link,
.container a:visited,
main a:link,
main a:visited { color: #0055AA; text-decoration: none; }
.title a:link,
.title a:visited { color: #000000; }
.authors a:link,
.authors a:visited { color: #6e6e6e; }
.content a:hover,
.content a:hover .text,
.ftsubheader a:hover { text-decoration: underline; }

span.author, span.tag { white-space: nowrap; }
span.author.jw { color: #000000; font-weight: 600; text-decoration: underline; }

/* Publication links: bracket notation, blue, underlined — clearly link-like. */
span.tag a {
  color: #0055AA;
  text-decoration: underline;
}
span.tag a::before { content: "["; text-decoration: none; }
span.tag a::after { content: "]"; text-decoration: none; }

.outercontainer { text-align: center; }
.header, .container, .content, .img, .text, main {
  display: inline-block;
  zoom: 1;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  vertical-align: middle;
  max-width: 1000px;
}
.header, .container, main { width: 100%; }
.img, .text { padding-left: 10px; padding-right: 10px; }
.header { line-height: 50px; }

.ftheader, .ftsubheader { display: inline-block; color: #FFF; }
.ftheader { float: left; padding-left: 15px; font-size: 1.17em; }
.ftsubheader { float: right; padding-left: 10px; padding-right: 20px; }
.ftheader a:link, .ftheader a:visited,
.ftsubheader a:link, .ftsubheader a:visited { color: #FFFFFF; text-decoration: none; }

.outercontainer, .content { padding-top: 0; padding-bottom: 0; }
.container, .content, main { width: 100%; }
main.body { margin-top: 50px; }
.content { margin-bottom: 6px; }

.heading, .front { text-align: left; position: relative; z-index: 1; }
.heading {
  display: flex;
  align-items: stretch;
  padding: 44px 0;
}
.heading .img {
  padding: 0 28px 0 10px;
  max-width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.heading .img img { width: 240px; }
.heading span.tag { padding-right: 15px; }
.heading ul { padding-bottom: 0; }
/* Right area: name centered on top, two columns below. */
.heading .right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.heading .right h1 {
  font-size: 2.4em;
  text-align: center;
  margin: 0 0 28px -60px;
}
.heading .right-cols {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
.heading .right-cols .text {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.heading .right-cols .text p { margin: 0.35em 0; }
.heading .right-cols .text .title { font-size: 1.15em; }
.heading .right-cols .info .role-line {
  font-weight: 600;
  font-size: 1.1em;
  color: #222;
  margin-bottom: 4px;
}
.heading .right-cols .info .fa { margin-right: 5px; }
/* Recruiting note: bold headline inside the unified recruit box. */
.recruit-note {
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px dashed #f0c0c0;
  font-size: 1.02em;
  color: #4a2b29;
  text-align: left;
}
.recruit-note b { color: #c0392b; }

/* Mission section: statement + ASI roadmap arrow. */
.mission-statement {
  font-size: 0.98em;
  font-style: italic;
  text-align: center;
  font-weight: 500;
  background: #f8fafc;
  border: 1px solid #e3e9f0;
  border-radius: 8px;
  padding: 12px 18px;
  margin: 0 0 14px;
}
.mission-statement b { color: #003366; }
.mission-flow-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 14px;
}
.mission-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.m-question {
  font-weight: 700;
  color: #003366;
  white-space: nowrap;
  font-size: 0.95em;
}
.m-step {
  background: #f4f7fb;
  border: 1px solid #dde5ef;
  border-radius: 6px;
  padding: 4px 7px;
  font-weight: 600;
  font-size: 0.78em;
  white-space: nowrap;
  flex-shrink: 0;
}
.m-step.asi {
  background: #003366;
  border-color: #003366;
  color: #ffffff;
}
.m-arrow { color: #0055AA; font-weight: 700; font-size: 0.85em; flex-shrink: 0; }

/* Physical AGI directions — restrained academic card style. */
.agi-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}
.agi-card {
  position: relative;
  padding: 14px 18px;
  padding-right: 72px;
  background: #fafbfc;
  border: 1px solid #e8ecf1;
  border-left: 3px solid #c9d4e3;
  border-radius: 8px;
}
.agi-num {
  position: absolute;
  right: 12px;
  width: 1.4em;
  text-align: center;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 4.2em;
  line-height: 1;
  font-weight: 700;
  color: rgba(26, 95, 180, 0.14);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 3px 10px rgba(26, 95, 180, 0.28);
  pointer-events: none;
  user-select: none;
}
.agi-card h3 .fa { margin-right: 6px; }
.agi-card:nth-child(1) {
  border-left-color: #1a5fb4;
  background: linear-gradient(180deg, #f4f8fc, #fafbfc);
}
.agi-card:nth-child(2) {
  border-left-color: #0e7c6b;
  background: linear-gradient(180deg, #f1f8f6, #fafbfc);
}
.agi-card:nth-child(3) {
  border-left-color: #5b5bd6;
  background: linear-gradient(180deg, #f5f4fc, #fafbfc);
}
.agi-card:nth-child(4) {
  border-left-color: #b45309;
  background: linear-gradient(180deg, #fbf6ef, #fafbfc);
}
.agi-card h3 {
  margin: 0 0 6px;
  font-size: 1.02em;
  color: #0f3460;
}
.agi-q {
  font-style: italic;
  font-weight: normal;
  font-size: 0.92em;
  color: #52606d;
}
.agi-k {
  margin: 2px 0 0;
  font-size: 0.9em;
  color: #6b7686;
}

/* Scrollable news box: fixed height, internal scroll shows all items. */
.news-box {
  height: 160px;
  overflow-y: auto;
  border: 1px solid #d6e4f5;
  border-radius: 6px;
  background: #fafbfc;
  padding: 4px 14px;
}
.news-box ul.news-list {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-list li {
  font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  padding: 6px 0;
  border-bottom: 1px dashed #e0e4e8;
  font-size: 0.9em;
}
.news-list li:last-child { border-bottom: none; }
.news-date {
  font-weight: 600;
  color: #003366;
  margin-right: 8px;
  white-space: nowrap;
}

/* Education / Experience items with institution logos. */
.edu-list { list-style: none; margin: 0; padding: 0; }
.edu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid #eef1f4;
}
.edu-item:last-child { border-bottom: none; }
.edu-item img, .logo-chip {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  padding: 3px;
}
.logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #003366;
  background: #eef4fb;
}
.edu-text { flex: 1; min-width: 0; }

.publication {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #f6f8fa;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.publication:last-of-type { margin-bottom: 0; }
.publication:hover {
  transform: translateY(-2px);
  background: #eef4fb;
  box-shadow: 0 6px 18px rgba(0, 51, 102, 0.10);
}
.publication .img {
  width: 300px;
  height: 180px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e8ecf1;
  transition: transform 0.3s ease;
}
.publication:hover .img { transform: scale(1.03); }
.publication .img img,
.publication .img video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.publication .text {
  flex: 1;
  min-width: 0;
  text-align: left;
  vertical-align: middle;
  padding-left: 0;
}
.publication .title a { transition: color 0.2s ease; }
.publication:hover .title a { color: #0055AA; }
.authors { font-size: 0.95em; color: #6e6e6e; }
span.venue, span.highlight { padding-right: 0; font-size: 0.95em; }
.publication span.tag { padding-right: 0; font-size: 0.95em; }

/* People */
.people-list {
  margin-top: 14px;
  background: #f6f8fa;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  padding: 4px 18px;
}
.person {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
  padding: 11px 2px;
  border-bottom: 1px solid #e8ecf1;
}
.person:last-child { border-bottom: none; }
.p-name {
  font-weight: 700;
  color: #003366;
  min-width: 130px;
}
.p-meta { color: #6b7686; }
.p-work { color: #444; }
.p-work a { color: #0055AA; }

.anchor { border-top: 50px solid transparent; margin-top: -50px; scroll-margin-top: 50px; }

/* Mobile responsiveness: stack columns, keep images (reference: Yiming Li). */
@media only screen and (max-width: 800px) {
  body { font-size: 15px; }
  main { padding: 8px 14px 32px; }

  /* header: single horizontally scrollable row */
  .header-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 6px;
    height: auto;
    min-height: 46px;
    padding: 4px 8px;
  }
  .header-inner .ftheader { font-size: 1.15em; flex-shrink: 0; }
  .header-inner .ftsubheader { font-size: 0.92em; padding: 0 7px; flex-shrink: 0; }
  main.body { margin-top: 46px; }

  /* hero: stack vertically, center */
  .heading { flex-direction: column; align-items: center; padding: 20px 0; }
  .heading .img { max-width: 100%; padding: 0 0 14px; }
  .heading .img img { width: 85%; max-width: 380px; }
  .heading .right { width: 100%; }
  .heading .right h1 { font-size: 1.9em; margin-left: 0; }
  .heading .right-cols { flex-direction: column; gap: 14px; align-items: center; }
  .heading .right-cols .text {
    width: 100%;
    text-align: center;
    padding: 0;
  }
  .heading .right-cols .text ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
  }
  .heading .right-cols .info .role-line { text-align: center; }
  .heading .right-cols .info p { text-align: center; }

  /* mission: wrap into multiple lines on mobile */
  .mission-flow-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .mission-flow { flex-wrap: wrap; justify-content: flex-start; width: 100%; }

  /* publications: stack image above text, uniform 16:9 media height */
  .publication { flex-direction: column; align-items: stretch; padding: 12px; }
  .publication .img {
    position: relative;
    width: 100%;
    height: 0;
    padding: 0 0 56.25%; /* 16:9 ratio, universally supported */
  }
  .publication .img img,
  .publication .img video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .publication .text { width: 100%; padding-left: 0; }

  /* experience */
  .edu-item { gap: 10px; }
  .edu-item img, .logo-chip { width: 36px; height: 36px; }

  /* direction cards */
  .agi-card { padding: 12px 14px; padding-right: 52px; }
  .agi-num { font-size: 3em; right: 8px; }

  /* section titles & banners */
  .content > .title { font-size: 1.25em; padding: 6px 12px; }
  .recruit-note { font-size: 0.95em; }
}

/* Very small screens: tighter spacing */
@media only screen and (max-width: 420px) {
  .header-inner .ftsubheader { font-size: 0.85em; padding: 0 5px; }
  .heading .img img { width: 85%; max-width: 300px; }
  .m-step { font-size: 0.68em; padding: 3px 5px; }
  .news-box { height: 140px; }
  .pub-title { font-size: 1em; }
}

/* Recruiting section: single unified box (note + list + apply). */
.recruit-block {
  margin: 0 0 14px;
  background: #fdf6f6;
  border: 1px solid #f3c9c9;
  border-left: 5px solid #e05a50;
  border-radius: 8px;
  padding: 14px 18px;
}
.recruit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.recruit-list li {
  font-size: 0.92em;
  color: #4a2b29;
  margin: 5px 0;
  line-height: 1.55;
}
.recruit-list li b { color: #c0392b; }
.recruit-apply {
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed #f0c0c0;
  font-size: 0.95em;
  color: #4a2b29;
  text-align: left;
}
