﻿/* Homepage layout. The shared stylesheet supplies navigation and form behavior. */
.home-width { width: min(1160px, 88%); margin-inline: auto; }
.masthead { color: var(--text); overflow: hidden; }
.masthead-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.3fr;
  gap: 5%;
  align-items: center;
  padding-block: clamp(36px, 4.5vw, 68px) clamp(38px, 5vw, 74px);
}
.masthead-copy {
  min-width: 0;
  container-type: inline-size;
  --emblem-column: clamp(46px, 17cqi, 80px);
  --identity-gap: clamp(10px, 3cqi, 16px);
}
.section-label, .feature-news time {
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-variant-numeric: tabular-nums;
}
.affiliation, .lab-identity {
  display: grid;
  grid-template-columns: var(--emblem-column) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--identity-gap);
}
.affiliation {
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin: 0 0 18px;
  color: #d0dded;
  font-size: clamp(15px, 4.2cqi, 18px);
  font-weight: 550;
  line-height: 1.45;
  letter-spacing: .025em;
  text-wrap: balance;
}
.affiliation img {
  width: clamp(44px, 12.5cqi, 58px);
  height: auto;
  justify-self: center;
}
.affiliation:hover, .affiliation:focus-visible { color: #fff; }
.affiliation:hover span, .affiliation:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }
html[lang="en"] .affiliation { letter-spacing: 0; }
.lab-identity-emblem { width: 100%; height: auto; }
.lab-identity-name { min-width: 0; container-type: inline-size; }
.masthead h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 52px);
  font-size: clamp(1.4rem, 14cqi, 3.25rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.025em;
}
html[lang="en"] .masthead h1 {
  max-inline-size: 16ch;
  font-size: clamp(1.6rem, 12cqi, 2.75rem);
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}
.lab-english-name {
  margin: 5px 0 0;
  color: #a8bfd9;
  font-size: clamp(12px, 4.7cqi, 18px);
  font-weight: 450;
  letter-spacing: .02em;
  line-height: 1.4;
}
.masthead-summary {
  max-inline-size: 25em;
  margin: 24px 0 0;
  color: #c4d1e4;
  font-size: 16px;
  line-height: 1.8;
  text-wrap: pretty;
}
.masthead-summary span { white-space: nowrap; }
.masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 24px; }
.masthead-actions a, .text-route {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
}
.masthead-actions a { gap: 8px; font-weight: 600; }
.masthead-actions a:not(.masthead-primary) { color: #c4d5ea; }
.masthead-actions a:not(.masthead-primary):hover, .text-route:hover { text-decoration: underline; text-underline-offset: 4px; }
.masthead-primary { background: #244d80; color: #f3f7ff; padding: 8px 16px; border: 1px solid #4675a9; border-radius: 8px; }
.masthead-primary:hover { background: #2e609b; }
.feature-news { min-width: 0; }
.feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.feature-header h2 { margin: 0; margin-inline-end: auto; font-size: clamp(19px, 1.65vw, 25px); }
.feature-playback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 34px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #111c30;
  color: #c2d8f1;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.feature-playback:hover, .feature-playback:focus-visible { color: white; border-color: #75caff; }
.feature-playback::before { content: ""; width: 0; height: 0; border-block: 4px solid transparent; border-inline-start: 7px solid currentColor; }
.feature-playback[data-playing="true"]::before { width: 7px; height: 9px; box-sizing: border-box; border: 0; border-inline: 2px solid currentColor; }
.feature-header a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #a8cef9; font-size: 13px; }
.feature-header a:hover, .feature-stage:hover .feature-title { text-decoration: underline; text-underline-offset: 4px; }
.feature-stage {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  width: 100%;
  min-height: 215px;
  aspect-ratio: 2.12;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #111c36;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .26);
}
.feature-cover, .feature-stage::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-cover { object-fit: cover; z-index: -2; }
.has-news-rotation .feature-cover { visibility: hidden; z-index: -3; }
.has-news-rotation .feature-cover.is-current { visibility: visible; z-index: -2; }
.feature-stage {
  --cover-clip: inset(0 0 0 100%);
  --enter-offset: 5%;
  --exit-offset: -7%;
}
.feature-stage[data-direction="backward"] {
  --cover-clip: inset(0 100% 0 0);
  --enter-offset: -5%;
  --exit-offset: 7%;
}
@media (prefers-reduced-motion: no-preference) {
  .feature-cover.is-entering { animation: news-cover-enter .62s cubic-bezier(.22,.72,.18,1); }
  .feature-cover.is-leaving { animation: news-cover-exit .62s cubic-bezier(.22,.72,.18,1); }
  @keyframes news-cover-enter {
    from { clip-path: var(--cover-clip); transform: translateX(var(--enter-offset)); }
    to { clip-path: inset(0); transform: translateX(0); }
  }
  @keyframes news-cover-exit {
    from { visibility: visible; transform: translateX(0); }
    to { visibility: visible; transform: translateX(var(--exit-offset)); }
  }
}
.feature-stage::before {
  content: "";
  z-index: -1;
  background: linear-gradient(180deg, transparent 12%, rgba(4, 10, 23, .2) 38%, rgba(4, 10, 23, .94) 100%);
}
.feature-caption { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 16px; padding: clamp(14px, 2vw, 24px); }
.feature-date { grid-column: 1 / -1; color: #cee8ff; font-size: 12px; letter-spacing: .06em; }
.feature-title { margin: 0; color: white; font-size: clamp(19px, 2vw, 29px); line-height: 1.3; text-wrap: pretty; }
.feature-read { color: #e4f5ff; font-size: 12px; white-space: nowrap; }
.feature-stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 12px 0 0; padding: 0; }
.feature-story {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 5px;
  width: 100%;
  height: 100%;
  padding: 10px 10px 9px;
  border: 0;
  border-top: 2px solid #33425f;
  background: transparent;
  color: #c1d1e9;
  font: 550 14px/1.5 var(--font);
  text-align: start;
  cursor: pointer;
}
.feature-story time { color: #9fb2d2; font-size: 11px; }
.feature-story:hover, .feature-story:focus-visible { background: rgba(68, 114, 187, .16); color: #fff; }
.feature-story[aria-pressed="true"] { border-top-color: #75caff; background: #13223c; color: #fff; }
.feature-progress {
  display: none;
  position: absolute;
  inset: -2px 0 auto;
  height: 2px;
  background: #94e2ff;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .has-news-rotation .feature-progress { display: block; }
  .has-news-rotation .feature-story[aria-pressed="true"] { border-top-color: #365677; }
}
.home-content { background: rgba(6, 11, 24, .82); color: var(--text); border-top: 1px solid var(--line); }
.home-content h2, .home-content h3 { color: var(--text); }
.home-content h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.2; letter-spacing: -.04em; }
.home-content p { color: var(--muted); line-height: 1.85; }
.home-content .section-label {
  color: var(--cyan);
  margin: 0 0 9px;
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 650;
  text-transform: uppercase;
}
.text-route { color: var(--cyan); }
.home-row {
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(0, 1.75fr);
  gap: 6%;
  align-items: start;
  padding-block: clamp(36px, 5vw, 66px);
  border-bottom: 1px solid var(--line);
}
.home-row header .text-route { margin-top: 12px; }
.selected-papers { list-style: none; margin: 0; padding: 0; }
.selected-papers li + li, .research-index article + article { border-top: 1px solid var(--line); }
.directory-links span { color: var(--cyan); justify-self: end; }
.home-content a:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 4px; }
.research-index article { display: grid; grid-template-columns: .8fr 1.5fr; gap: 20px; padding-block: 20px; }
.research-index article:first-child { padding-top: 4px; }
.research-index h3 { margin: 0; font-size: 20px; }
.research-index p, .lab-about p:last-child { margin: 0; }
.lab-about p:first-child { font-size: 18px; color: var(--text); }
.project-feature h3 { margin: 0 0 10px; font-size: 22px; }
.faculty-entry { display: flex; align-items: center; gap: 24px; }
.faculty-entry img { width: 100px; height: 130px; object-fit: cover; border-radius: 2px; }
.faculty-entry h3, .faculty-entry p { margin-bottom: 5px; }
.faculty-entry a[href^="mailto:"] { color: var(--cyan); overflow-wrap: anywhere; font-size: 14px; }
.directory-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.directory-links a { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 2px; }
.selected-papers li { padding-block: 16px; }
.selected-papers li:first-child { padding-top: 0; }
.selected-papers strong { font: 600 clamp(17px, 1.5vw, 21px)/1.5 var(--font); }
.selected-papers span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.home-join { grid-template-columns: 1fr 1fr; border-bottom: 0; }
.home-join header { margin-bottom: 22px; }
.home-join .contact-lines { color: var(--muted); font-size: 14px; }
.home-join .contact-lines span::before, .home-join .contact-form::before { content: none; }
.home-join .contact-form { background: #101a30; border: 1px solid var(--line); border-radius: 3px; box-shadow: none; }
.home-join label, .home-join input, .home-join textarea, .home-join select, .home-join option { color: var(--text); }
.home-join input, .home-join textarea, .home-join select, .home-join option { background: #0a1226; border-color: #4e6488; border-radius: 2px; }
.home-join ::placeholder { color: #9fb1cc; }
.home-join .button.primary { background: #225baf; box-shadow: none; border-radius: 2px; }
.home-join .form-hint a { color: var(--cyan); }
.home-page .reveal { opacity: 1; transform: none; transition: none; }
.home-content :focus-visible { outline-color: var(--cyan); }
@media (max-width: 800px) {
  .home-width { width: 90%; }
  .masthead-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 34px; }
  .masthead-actions { gap: 6px 16px; }
  .home-row { grid-template-columns: minmax(145px, .6fr) 1.5fr; gap: 4%; }
  .research-index article { grid-template-columns: 1fr; gap: 5px; }
  .home-join { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .home-row { grid-template-columns: 1fr; }
  .masthead-layout { gap: 26px; padding-block: 32px; }
  .affiliation { margin-bottom: 14px; }
  .masthead-summary { margin-top: 16px; }
  .masthead-actions { margin-top: 18px; }
  .feature-stage { min-height: 190px; }
  .feature-caption { grid-template-columns: 1fr; gap: 5px; }
  .feature-stories { grid-template-columns: 1fr; gap: 2px; }
  .feature-story { flex-direction: row; align-items: baseline; gap: 12px; border: 0; border-inline-start: 2px solid #33425f; min-height: 44px; }
  .feature-story time { flex: none; }
  .feature-story[aria-pressed="true"] { border-inline-start-color: #75caff; }
  .feature-progress { inset: auto 0 0; }
  .home-row { gap: 20px; }
  .home-row > header:has(.text-route) { display: grid; grid-template-columns: 1fr auto; align-items: end; }
  .home-row header .section-label { grid-column: 1 / -1; }
  .home-row header .text-route { margin: 0; min-height: 36px; }
  .faculty-entry { gap: 14px; align-items: start; }
  .faculty-entry img { width: 72px; height: 96px; }
  .home-join .contact-form { padding: 20px; }
}