/* Homepage fluid study. Controls and project links remain ordinary, bilingual HTML. */
:root { --sidebar-col: 210px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body { background: #f7f6f2; }
.wiki-header { background: #f7f6f2ed; box-shadow: none; border-color: #e3e1db; backdrop-filter: blur(14px); }
.wiki-header-inner { max-width: 1600px; height: 58px; padding: 0 26px; }
.research-brand { margin-right: auto; display: flex; align-items: center; gap: 12px; color: #292a30 !important; text-decoration: none !important; }
.research-brand-mark { font-size: 18px; font-weight: 700; letter-spacing: -1px; }
.research-brand-caption { padding-left: 12px; border-left: 1px solid #d8d6cf; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: #6e6d76; }
.wiki-wrapper { max-width: 1600px; background: #fdfcf9; box-shadow: none; border-color: #e3e1db; }
.wiki-wrapper::before { display: none; }
.wiki-wrapper::after { background-image: linear-gradient(#e8e6e0, #e8e6e0); }
.wiki-sidebar { padding-top: 34px; top: 70px; }
.wiki-sidebar .infobox-stats a[href^="mailto:"] { font-size: 11px; }
.wiki-sidebar .infobox-stats a[href^="mailto:"] .stat-text > span { font-size: 11px; word-break: normal; }
.wiki-content { padding: 32px 38px; }
.wiki-footer { max-width: 1600px; background: #fdfcf9; border-color: #e3e1db; }
.research-hero { margin: 2px 0 28px; }
.research-intro { position: relative; isolation: isolate; min-height: 560px; display: flex; align-items: center; }
.research-copy { position: relative; z-index: 2; width: 46%; max-width: 510px; padding: 34px 0 64px; min-width: 0; }
.research-eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 20px; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #696775; text-transform: uppercase; }
.research-eyebrow::before { content: ''; width: 6px; height: 6px; background: #7966a7; border-radius: 50%; box-shadow: 0 0 0 4px #7966a70d; }
.research-copy .wiki-title { display: block; border: 0; min-height: 0; margin: 0 0 16px; padding: 0; font-size: clamp(44px, 4.4vw, 67px); font-weight: 400; letter-spacing: -.065em; line-height: 1.06; }
.research-title-zh { font-size: 18px; letter-spacing: .13em; margin-left: 12px; color: #77737f; vertical-align: middle; }
.research-statement { margin: 0 0 17px; font-size: clamp(23px, 2vw, 29px); line-height: 1.34; letter-spacing: -.035em; color: #34303c; font-weight: 400; }
.research-statement em { color: #79619a; font-style: normal; }
.research-bio { max-width: 370px; font-size: 14px; line-height: 1.8; color: #696771; margin: 0 0 22px; }
.research-directions { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0 0 27px; list-style: none; }
.research-directions a { font-size: 11px; font-weight: 600; color: #595663 !important; text-decoration: none; padding: 5px 0; border-bottom: 1px solid #dad5e1; white-space: nowrap; }
.research-directions a:hover { color: #7952ae !important; border-color: #7952ae; }
.research-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.research-actions #ai-agent-section { display: flex; margin: 0; }
.research-action { display: inline-flex; align-items: center; justify-content: center; gap: 14px; font-size: 12px; line-height: 1.4; font-weight: 600; padding: 12px 17px; border: 1px solid #dbd6e2; border-radius: 5px; color: #4d435d !important; text-decoration: none !important; background: #fdfcf9; transition: background .2s, transform .2s; }
.research-action:hover { transform: translateY(-2px); background: #f0ebf6; }
.research-action-primary { background: #393040; border-color: #393040; color: #fff !important; }
.research-action-primary:hover { background: #53405f; }
.research-hiring { margin: 23px 0 0; font-size: 11px; color: #75717a; display: flex; gap: 7px; align-items: center; }
.research-hiring::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #738b70; }
.research-hiring a { color: #68606f !important; text-underline-offset: 3px; }
.research-stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.research-stage::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #fdfcf9ed 0%, #fdfcf9d9 24%, #fdfcf9a6 36%, #fdfcf930 54%, #fdfcf900 68%); }
.research-viewport { position: absolute; inset: 0 18% 0 -18%; }
.research-stage[data-animation="fluid"] .research-viewport { inset: 0; container-type: size; }
.research-intro[data-animation="fluid"] { touch-action: pan-y; }
.research-stage[data-animation="fluid"]::after { background: linear-gradient(90deg, #fdfcf9 0%, #fdfcf9f5 25%, #fdfcf9b3 39%, #fdfcf926 57%, #fdfcf900 70%); }
#research-canvas, #research-fallback { width: 100%; height: 100%; position: absolute; inset: 0; display: block; }
#research-canvas { opacity: 0; pointer-events: none; transition: opacity .8s; touch-action: pan-y; }
#research-fallback { object-fit: contain; object-position: center; transition: opacity .8s; pointer-events: none; }
.research-stage[data-animation="fluid"]:not(.is-generic-fallback) #research-fallback { inset: auto; left: 70%; top: 46%; width: min(48cqw, 78cqh); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
.research-stage.is-ready #research-canvas { opacity: 1; }
.research-stage.is-ready #research-fallback { opacity: 0; }
.research-stage-ui { position: absolute; right: 0; bottom: 23px; z-index: 2; }
.research-stage-toolbar { display: flex; align-items: center; gap: 18px; }
.research-stage-caption { color: #8a818d; font-size: 10px; line-height: 1.6; }
#research-animation-name { display: block; color: #75677e; letter-spacing: .06em; }
#research-animation-hint { display: block; }
.research-controls { display: flex; gap: 6px; align-items: center; visibility: hidden; pointer-events: auto; }
.research-stage.is-ready .research-controls { visibility: visible; }
.research-controls button { display: inline-flex; align-items: center; gap: 6px; background: #ffffff60; border: 1px solid #e1dce4; color: #75677e; font: inherit; font-size: 10px; line-height: 1.2; padding: 8px 10px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.research-controls button:hover { border-color: #a795bd; background: #fff; }
.research-controls button svg { height: 12px; width: 12px; }
.research-controls button[aria-pressed="true"] { background: #ece6f2; }
.research-paused-label { display: none; }
.research-stage.is-paused .research-running-label { display: none; }
.research-stage.is-paused .research-paused-label { display: inline; }
.research-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #e3ded9; border-bottom: 1px solid #e3ded9; margin-top: 0; }
.research-project { display: flex; align-items: flex-start; gap: 13px; padding: 20px 18px; text-decoration: none !important; color: #4b4357 !important; transition: background .25s; position: relative; min-width: 0; }
.research-project + .research-project { border-left: 1px solid #e3ded9; }
.research-project:first-child { padding-left: 0; }
.research-project:last-child { padding-right: 0; }
.research-project:hover, .research-project.is-active { background: #f0ebf5; }
.research-project-number { align-self: flex-start; padding-top: 2px; font-family: var(--font-mono); font-size: 9px; color: #a192ae; }
.research-project-label { min-width: 0; }
.research-project-label strong { display: block; font-size: 12px; font-weight: 600; }
.research-project-versions { align-items: flex-start; }
.research-version-links { display: flex; gap: 16px; margin-top: 6px; }
.research-version-links a { color: #6f518b !important; font-size: 11px; text-decoration: none; border-bottom: 1px solid #d5c9df; padding: 0 2px; }
.research-version-links a:hover { color: #482769 !important; border-color: #8e6eab; }
.research-project-label small { display: block; color: #736a78; font-size: 11px; margin-top: 2px; }
.research-project-arrow { align-self: center; margin-left: auto; font-size: 14px; color: #91869d; }
.research-notes { color: #77717b; font-size: 12px; margin: 0 0 28px; line-height: 1.8; }
.research-notes p { margin: 8px 0; }
.research-directions-expanded { margin-top: 11px; }
.research-notes .research-directions-heading { color: #6d5a83; font-size: 11px; font-weight: 600; }
.research-directions-expanded ul { margin: 10px 0 6px; padding-left: 20px; }
.research-hero a:focus-visible, .research-controls button:focus-visible { outline: 2px solid #8a66b1; outline-offset: 4px; }
.research-motion-note { display: none; }
.research-stage.is-ready .research-motion-note { display: inline; }
.research-stage.is-ready .research-static-note { display: none; }
@media (min-width: 1500px) { .research-intro { min-height: 580px; } }
@media (min-width: 901px) and (max-width: 1200px) {
  :root { --sidebar-col: 175px; }
  .wiki-content { padding: 26px 24px; }
  .research-intro { min-height: 540px; }
  .research-copy { width: 51%; }
  .research-stage-caption { max-width: 150px; }
  .research-controls button { padding: 8px; }
}
@media (max-width: 900px) {
  .wiki-content { padding: 24px 18px; }
  .research-intro { min-height: 570px; }
  .research-copy { width: 100%; max-width: 450px; padding: 26px 0 95px; }
  .research-stage::after { background: linear-gradient(90deg, #fdfcf9e6, #fdfcf980); }
  .research-stage-ui { left: 0; right: auto; bottom: 22px; }
  .research-stage-caption { max-width: 145px; }
  .research-copy .wiki-title { font-size: 54px; }
  .research-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-action { width: 100%; min-height: 44px; padding: 10px 8px; gap: 8px; text-align: center; }
  .research-project { padding: 14px 10px; gap: 7px; }
  .research-project-number { display: none; }
  .research-project-label strong { font-size: 10px; line-height: 1.4; min-height: 2.8em; }
  .research-project-label small { font-size: 9px; }
  .research-brand-caption { display: none; }
  .research-intro[data-animation="fluid"] { display: block; min-height: 0; }
  .research-intro[data-animation="fluid"] .research-copy { padding-bottom: 18px; }
  .research-stage[data-animation="fluid"] { position: relative; height: 300px; margin-bottom: 12px; }
  .research-stage[data-animation="fluid"]::after { background: linear-gradient(0deg, #fdfcf9 0%, #fdfcf900 28%); }
  .research-stage[data-animation="fluid"] .research-stage-ui { bottom: 12px; }
  .research-stage[data-animation="fluid"]:not(.is-generic-fallback) #research-fallback { left: 52%; width: min(84cqw, 78cqh); }
}
@media (prefers-reduced-motion: reduce) { .research-action:hover { transform: none; } }
