:root {
  --max: 1240px;
  --header-height: 84px;
  --sans: "SF Pro Display", "SF Pro Text", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #14252e;
  --muted: #60717a;
  --muted-strong: #3e535d;
  --line: rgba(20, 53, 65, 0.13);
  --line-strong: rgba(20, 53, 65, 0.25);
  --panel: #ffffff;
  --panel-2: #edf3f4;
  --bg: #f4f7f8;
  --bg-deep: #e7edef;
  --accent: #087e78;
  --accent-hover: #096c68;
  --accent-soft: #dcefeb;
  --accent-2: #315ea8;
  --accent-ink: #ffffff;
  --header-bg: rgba(244, 247, 248, .88);
  --panel-glass: rgba(255, 255, 255, .72);
  --glow-1: rgba(34, 146, 137, .12);
  --glow-2: rgba(72, 116, 190, .09);
  --image-frame: rgba(8, 126, 120, .32);
  --released: rgba(8, 126, 120, .06);
  --play-bg: rgba(16, 34, 42, .68);
  --surface-raised: rgba(255, 255, 255, .9);
  --shadow-soft: 0 18px 48px rgba(28, 54, 64, .07);
  --shadow-media: 0 24px 60px rgba(23, 49, 60, .13);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf6f4;
  --muted: #91a1aa;
  --muted-strong: #bdc9cc;
  --line: rgba(237, 246, 244, 0.14);
  --line-strong: rgba(237, 246, 244, 0.25);
  --panel: #0b1827;
  --panel-2: #0d1d2c;
  --bg: #07111f;
  --bg-deep: #040b14;
  --accent: #5de1c2;
  --accent-hover: #8aecd5;
  --accent-soft: #123b3c;
  --accent-2: #7aa7ff;
  --accent-ink: #04110e;
  --header-bg: rgba(7, 17, 31, .84);
  --panel-glass: rgba(11, 24, 39, .64);
  --glow-1: rgba(34, 117, 125, .10);
  --glow-2: rgba(61, 112, 222, .18);
  --image-frame: rgba(93, 225, 194, .35);
  --released: rgba(93, 225, 194, .07);
  --play-bg: rgba(4, 11, 20, .62);
  --surface-raised: rgba(11, 24, 39, .9);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, .18);
  --shadow-media: 0 26px 64px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1.5rem); }
body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 1%, var(--glow-2), transparent 34rem),
    radial-gradient(circle at 12% 24%, var(--glow-1), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .65rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(calc(100% - 3rem), var(--max));
  min-height: var(--header-height);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 68%, transparent);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}
.header-spacer { min-width: 1px; }
.site-header nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2rem); color: var(--muted); }
.site-header nav a { position: relative; padding: .45rem 0; font-size: .9rem; transition: color .2s ease; }
.site-header nav a::after { content: ""; position: absolute; right: 0; bottom: .18rem; left: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .2s ease; }
.site-header nav a:hover, .site-header nav a:focus-visible, .site-header nav a.is-active { color: var(--ink); }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after, .site-header nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 1rem; }
.language-toggle { min-height: 36px; padding: .35rem .65rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--accent); cursor: pointer; font-size: .82rem; font-weight: 700; transition: border-color .2s ease, background-color .2s ease; }
.language-toggle:hover, .language-toggle:focus-visible { border-color: var(--line-strong); background: var(--panel-glass); }
.header-email { color: var(--muted-strong); }
.menu-toggle { display: none; }
.theme-toggle { display: inline-flex; min-height: 36px; align-items: center; gap: .45rem; padding: .35rem .65rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel-glass); color: var(--muted-strong); cursor: pointer; font-size: .76rem; transition: border-color .2s ease, background-color .2s ease; }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--accent); }
.theme-icon { color: var(--accent); font-size: 1rem; line-height: 1; }

main, footer { width: min(calc(100% - 3rem), var(--max)); margin: auto; }
.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2.75rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3.25rem, 5.5vw, 5.5rem) 0 clamp(2.75rem, 4vw, 4rem);
}
@media (min-width: 1021px) {
  .hero { align-items: stretch; }
  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .hero-copy h1, .hero-copy .hero-lead, .hero-copy .hero-actions { margin-top: 0; }
}
.eyebrow, .section-kicker p, .project-type, .paper-venue, .demo-card > span {
  margin: 0;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .15em;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 1.25rem 0 1.8rem;
  font-size: clamp(4rem, 8vw, 7.35rem);
  line-height: .88;
  letter-spacing: -.075em;
}
.hero-lead { max-width: 13em; margin-bottom: 0; font-size: clamp(1.5rem, 2.6vw, 2.35rem); line-height: 1.35; letter-spacing: -.03em; text-wrap: balance; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; padding: .72rem 1.1rem; border: 1px solid var(--line); font-size: .92rem; transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 750; }
.button:hover, .button:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.button.primary:hover, .button.primary:focus-visible { background: var(--accent-hover); }
.email-icon-link { width: 2.5rem; height: 2.5rem; display: inline-grid; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--line-strong); color: var(--muted-strong); transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.email-icon-link svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.email-icon-link:hover, .email-icon-link:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.header-email.email-icon-link { width: 2.25rem; height: 2.25rem; border-radius: 50%; }
.button.email-icon-link--hero { width: auto; min-height: 3rem; display: inline-flex; gap: .55rem; padding: .72rem 1.1rem; }
.hero-visual { margin: 0; position: relative; padding: .6rem; border: 1px solid var(--image-frame); border-radius: 16px; background: color-mix(in srgb, var(--panel) 82%, transparent); box-shadow: var(--shadow-media); }
.hero-visual::before { content: "INTERVIEW / VLA · WORLD MODEL"; position: absolute; z-index: 2; top: 1.35rem; left: 1.35rem; padding: .4rem .58rem; border: 1px solid rgba(255,255,255,.35); background: rgba(4, 11, 20, .66); color: #fff; font-size: .58rem; font-weight: 760; letter-spacing: .12em; pointer-events: none; }
.hero-visual img { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; object-fit: cover; display: block; filter: saturate(.84) contrast(1.05); }
.hero-visual figcaption { display: flex; gap: 1rem; margin-top: .6rem; color: var(--muted); font-size: .76rem; letter-spacing: .04em; }
.hero-visual figcaption a {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .9rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  letter-spacing: .02em;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.hero-visual figcaption a:hover, .hero-visual figcaption a:focus-visible { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }

.identity-strip {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.identity-strip > div { min-width: 0; padding: 1.25rem 2rem 1.35rem 0; }
.identity-strip > div + div { padding-right: 0; padding-left: 2rem; border-left: 1px solid var(--line); }
.strip-label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .76rem; }
.identity-strip strong { display: block; overflow-wrap: anywhere; font-size: .98rem; }

.section { padding: clamp(4.5rem, 7vw, 7rem) 0; border-bottom: 1px solid var(--line); }
.section-kicker { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(1.75rem, 2.5vw, 2.25rem); }
.section-kicker span { display: grid; width: 2.15rem; height: 2.15rem; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .68rem; font-weight: 760; }
.section-heading-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, .6fr); gap: 3rem; align-items: end; margin-bottom: 2.4rem; }
.section-heading-row h2, .about-grid h2, .contact-section h2 { margin: 0; font-size: clamp(2.5rem, 4.2vw, 3.85rem); line-height: 1.08; letter-spacing: -.05em; }
.section-heading-row p { max-width: 28rem; margin: 0 0 .35rem; color: var(--muted); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(24rem, .9fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.about-copy { max-width: 40rem; padding-top: .4rem; color: var(--muted-strong); font-size: 1.06rem; }
.about-copy p + p { margin-top: 1.4rem; }
.about-copy p:last-child { margin-bottom: 0; }
@media (min-width: 1021px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(24rem, .85fr);
    gap: clamp(2.5rem, 3.25vw, 3.25rem);
  }
  .about-grid h2 {
    font-size: clamp(2.8rem, 3.6vw, 3.45rem);
    line-height: 1.12;
    letter-spacing: -.045em;
  }
  .about-copy { padding-top: .15rem; line-height: 1.7; }
  .about-copy p + p { margin-top: 1.05rem; }
}
.career-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; margin-top: clamp(1.5rem, 2.5vw, 2.25rem); }
.career-grid article { position: relative; min-height: 235px; padding: 1.5rem 1.4rem 1.7rem; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-glass); transition: border-color .2s ease, transform .2s ease; }
.career-grid article::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: color-mix(in srgb, var(--accent) 72%, transparent); }
.career-grid article:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); }
.career-grid .career-current { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(145deg, var(--accent-soft), var(--panel-glass) 68%); }
.career-mark { color: var(--muted); font-size: .72rem; }
.career-org { display: flex; min-height: 3rem; margin: .65rem 0 1.85rem; align-items: flex-end; }
.career-logo { display: grid; width: 5.5rem; height: 2rem; flex: 0 0 auto; place-items: center; padding: .35rem .5rem; border: 1px solid var(--line); background: #fff; }
.career-logo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left bottom; transition: filter .2s ease; }
.career-logo--zju { width: 11rem; height: 3rem; padding: 0; border: 0; background: transparent; }
.career-logo--alibaba { width: 7rem; height: 2.4rem; padding: 0; border: 0; background: transparent; transform: translateY(.85rem); }
.career-logo--nio { width: 5.25rem; height: 2.4rem; padding: 0; border: 0; background: transparent; transform: translateY(1rem); }
.career-logo--magiclab { width: 10.5rem; height: 2.4rem; padding: 0; border: 0; background: transparent; transform: translateY(1.15rem); }
:root[data-theme="dark"] .career-logo--zju img { filter: brightness(0) invert(1); }
:root[data-theme="dark"] .career-logo--nio img { filter: brightness(0) invert(1); }
:root[data-theme="dark"] .career-logo--magiclab img { filter: brightness(0) invert(1); }
.career-grid h3 { margin-bottom: .65rem; font-size: 1.25rem; line-height: 1.25; }
.career-grid article > p:last-child { margin: 0; color: var(--muted); font-size: .88rem; }
.profile-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.profile-notes article { padding: 1.6rem 1.7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-glass); }
.mini-label { margin-bottom: .7rem; color: var(--accent); font-size: .68rem; font-weight: 750; letter-spacing: .13em; }
.profile-notes h3 { margin-bottom: .5rem; font-size: 1.1rem; }
.profile-notes article > p:last-child:not(.talent-line) { margin: 0; color: var(--muted); font-size: .87rem; }
.profile-notes .reviewer-line { font-size: 1.1rem; line-height: 1.5; letter-spacing: -.01em; }
.profile-notes article > p.talent-line { margin: 1.15rem 0 0; color: var(--muted); font-size: 1.1rem; font-weight: 400; line-height: 1.5; }
.profile-notes .reviewer-line { margin: 0; color: var(--ink); font-weight: 800; }

.system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.system-card {
  --system-accent: #7663ff;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--system-accent) 30%, var(--line));
  border-radius: 12px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--system-accent) 9%, transparent), transparent 44%),
    var(--panel-glass);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.system-card:nth-child(2) { --system-accent: #12a995; }
.system-card:nth-child(3) { --system-accent: #3f7fe0; }
.system-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--system-accent), color-mix(in srgb, var(--system-accent) 16%, transparent));
}
.system-card::after {
  content: "01";
  position: absolute;
  z-index: -1;
  top: .15rem;
  right: .8rem;
  color: color-mix(in srgb, var(--system-accent) 8%, transparent);
  font-size: clamp(6rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.08em;
  pointer-events: none;
}
.system-card:nth-child(2)::after { content: "02"; }
.system-card:nth-child(3)::after { content: "03"; }
.system-card:hover { border-color: color-mix(in srgb, var(--system-accent) 58%, var(--line)); box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.system-number {
  position: absolute;
  z-index: 2;
  top: 1.35rem;
  right: 1.35rem;
  min-width: 2.15rem;
  padding: .2rem .45rem;
  border: 1px solid color-mix(in srgb, var(--system-accent) 38%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--system-accent) 8%, var(--panel));
  color: var(--system-accent);
  font-size: .66rem;
  font-weight: 750;
  text-align: center;
}
.system-card .mini-label { position: relative; z-index: 1; color: var(--system-accent); }
.system-card h3 { position: relative; z-index: 1; max-width: 100%; margin: 2.75rem 0 .85rem; font-size: clamp(1.4rem, 1.65vw, 1.7rem); line-height: 1.18; letter-spacing: -.04em; overflow-wrap: anywhere; white-space: normal; }
.system-card > p:not(.mini-label) { position: relative; z-index: 1; color: var(--muted-strong); line-height: 1.75; }
.team-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-top: .9rem; }
.team-metrics span { min-width: 0; padding: .65rem .6rem; border: 1px solid color-mix(in srgb, var(--system-accent) 22%, var(--line)); border-radius: 7px; background: color-mix(in srgb, var(--system-accent) 6%, var(--panel)); }
.team-metrics span + span { padding-left: .6rem; }
.team-metrics strong, .team-metrics small { display: block; }
.team-metrics strong { color: color-mix(in srgb, var(--system-accent) 72%, var(--ink)); font-size: clamp(1.15rem, 1.8vw, 1.55rem); line-height: 1.1; letter-spacing: -.04em; }
.team-metrics small { margin-top: .2rem; color: var(--muted); font-size: .65rem; line-height: 1.3; }
.system-card ul { position: relative; z-index: 1; display: grid; gap: .5rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.system-card li { position: relative; min-width: 0; padding: .7rem .7rem .7rem 1.75rem; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--panel) 72%, transparent); color: var(--muted); font-size: .82rem; line-height: 1.5; }
.system-card li::before { content: ""; position: absolute; top: 50%; left: .72rem; width: .38rem; height: .38rem; border-radius: 50%; background: var(--system-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--system-accent) 12%, transparent); transform: translateY(-50%); }
.system-card:first-child ul { margin-top: .7rem; }
.flywheel { margin-top: 1.25rem; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line)); border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 5%, var(--panel)), var(--panel-glass) 55%); box-shadow: var(--shadow-soft); overflow: hidden; }
.flywheel-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 2rem; align-items: center; }
.flywheel-heading .mini-label { grid-column: 1; margin: 0; }
.flywheel-heading h3 { grid-column: 1; margin: 0; font-size: clamp(1.1rem, 2vw, 1.55rem); line-height: 1.35; letter-spacing: -.02em; }
.flywheel-heading > span { grid-column: 2; grid-row: 1 / span 2; color: var(--accent); font-size: .78rem; font-weight: 750; }
.flywheel-track { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 2.2rem; }
.flywheel-track::before { content: ""; position: absolute; z-index: 0; top: 50%; right: 3%; left: 3%; height: 5px; border-radius: 999px; background: var(--bg-deep); transform: translateY(-50%); }
.flywheel-step { position: relative; z-index: 1; min-width: 0; display: grid; grid-template-rows: 102px 34px 54px 34px 102px; justify-items: center; }
.flywheel-step:nth-child(1), .flywheel-step:nth-child(7) { --step-color: #6c50ff; }
.flywheel-step:nth-child(2), .flywheel-step:nth-child(6) { --step-color: #4f82e8; }
.flywheel-step:nth-child(3) { --step-color: #4db780; }
.flywheel-step:nth-child(4) { --step-color: #e56777; }
.flywheel-step:nth-child(5) { --step-color: #b58c2f; }
.flywheel-step:not(:last-child)::after { content: "›"; position: absolute; z-index: 4; top: 50%; right: -.28rem; color: #b58c2f; font-size: 1.25rem; font-weight: 800; line-height: 1; transform: translateY(-54%); }
.flywheel-card { width: calc(100% - .7rem); max-width: 150px; min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: .75rem .55rem; border: 1px solid var(--step-color); border-radius: 9px; background: var(--panel); text-align: center; }
.flywheel-card h4 { margin: 0; font-size: .86rem; line-height: 1.35; }
.flywheel-card p { margin: .35rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.step-top .flywheel-card { grid-row: 1; }
.step-top .step-stem { grid-row: 2; }
.step-bottom .step-stem { grid-row: 4; }
.step-bottom .flywheel-card { grid-row: 5; }
.step-stem { width: 1px; height: 100%; background: var(--step-color); }
.step-node { z-index: 3; grid-row: 3; align-self: center; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--step-color); color: #fff; font-size: .74rem; font-weight: 800; box-shadow: 0 0 0 6px var(--panel); }
.flywheel-insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: .7rem 7% 0; }
.flywheel-insights span { padding: .45rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--muted-strong); text-align: center; font-size: .72rem; font-weight: 650; }
.flywheel-return { position: relative; min-height: 62px; margin: .7rem 7.14% 0; padding: 1rem 1.4rem 0; display: flex; justify-content: flex-end; align-items: flex-start; gap: 1rem; border-bottom: 2px solid var(--accent-2); border-radius: 0 0 10px 10px; color: var(--accent-2); }
.flywheel-return strong { font-size: .88rem; }
.flywheel-return span { color: var(--muted); font-size: .72rem; }
.flywheel-return .loop-terminal { position: absolute; z-index: 0; bottom: -2px; width: 2px; height: 282px; background: var(--accent-2); color: var(--accent-2); pointer-events: none; }
.flywheel-return .loop-terminal::before { content: "↑"; position: absolute; top: 0; left: 50%; color: var(--accent-2); font-size: 1rem; font-weight: 800; line-height: 1; transform: translate(-50%, -42%); }
.flywheel-return .loop-terminal-start { left: 0; }
.flywheel-return .loop-terminal-end { right: 0; }

.scale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.metric-card { --metric: #7663ff; position: relative; min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 1.35rem 1.55rem 1.45rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-glass); background: linear-gradient(145deg, color-mix(in srgb, var(--metric) 13%, var(--panel)) 0%, var(--panel-glass) 62%); isolation: isolate; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.metric-card::before { content: ""; position: absolute; z-index: 2; top: 0; right: 0; left: 0; height: 4px; background: var(--metric); }
.metric-card::after { content: "RD"; position: absolute; z-index: -1; top: .4rem; right: 1rem; color: var(--metric); font-size: 6.8rem; font-weight: 850; line-height: 1; letter-spacing: -.1em; opacity: .07; }
.metric-card:hover { border-color: color-mix(in srgb, var(--metric) 65%, var(--line)); box-shadow: 0 14px 35px color-mix(in srgb, var(--metric) 13%, transparent); transform: translateY(-3px); }
.metric-molmo { --metric: #f39a44; }
.metric-molmo::after { content: "MS"; }
.metric-robot { --metric: #27bfa7; }
.metric-robot::after { content: "R²"; }
.metric-meta { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .66rem; font-weight: 750; letter-spacing: .1em; }
.metric-meta span:first-child { color: var(--metric); }
.metric-value { position: relative; z-index: 1; display: flex; align-items: baseline; gap: .5rem; margin: .75rem 0 auto; line-height: .88; }
.metric-value strong { color: var(--metric); font-size: clamp(3.4rem, 5vw, 5.2rem); font-weight: 760; letter-spacing: -.075em; }
.metric-value > span { color: var(--ink); font-size: clamp(1.35rem, 2vw, 2rem); font-weight: 760; letter-spacing: .04em; }
.metric-percent { gap: .15rem; }
.metric-percent > span { color: var(--metric); font-size: clamp(1.7rem, 2.5vw, 2.7rem); letter-spacing: -.04em; }
.metric-name { position: relative; z-index: 1; margin: 1.2rem 0 0; padding-top: .85rem; border-top: 1px solid color-mix(in srgb, var(--metric) 35%, var(--line)); color: var(--muted-strong); font-size: .9rem; font-weight: 680; }
.metric-proof { position: relative; z-index: 1; height: 128px; flex: none; margin-top: 1rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--metric) 38%, var(--line)); border-radius: 8px; }
.metric-proof-placeholder, .metric-proof-eval { display: grid; place-content: center; gap: .15rem; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--metric) 8%, transparent) 0 8px, transparent 8px 16px); color: var(--metric); text-align: center; }
.metric-proof-placeholder { border-style: dashed; }
.metric-proof-placeholder span, .metric-proof-eval span { font-size: .8rem; font-weight: 820; letter-spacing: .12em; }
.metric-proof-placeholder small, .metric-proof-eval small { color: var(--muted); font-size: .66rem; letter-spacing: .05em; }
.metric-proof-image { display: block; background: var(--panel-2); }
.metric-proof-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 68%; filter: saturate(.88) contrast(.96); transition: filter .25s ease, transform .35s ease; }
.metric-proof-contain { background: #fff; }
.metric-proof-contain img { object-fit: contain; object-position: center; }
.metric-proof-image::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(4, 11, 20, .7)); }
.metric-proof-image > span { position: absolute; z-index: 2; right: .7rem; bottom: .55rem; color: #fff; font-size: .67rem; font-weight: 750; letter-spacing: .04em; }
.metric-proof-image:hover img, .metric-proof-image:focus-visible img { filter: saturate(1) contrast(1); transform: scale(1.025); }
.metric-proof-eval { background: linear-gradient(135deg, color-mix(in srgb, var(--metric) 16%, transparent), transparent 65%), repeating-linear-gradient(90deg, color-mix(in srgb, var(--metric) 9%, transparent) 0 1px, transparent 1px 18px); }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.outcome-grid > article { position: relative; min-height: 300px; padding: clamp(1.6rem, 3vw, 2.6rem); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-glass); }
.outcome-grid > article::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), transparent 60%); }
.outcome-grid h3 { margin: 1.8rem 0 .8rem; font-size: clamp(1.65rem, 2.7vw, 2.55rem); line-height: 1.15; letter-spacing: -.04em; }
.outcome-grid article > p:not(.mini-label) { color: var(--muted); }
.inline-emphasis { color: var(--ink); font-weight: 800; }
.evidence-chips, .event-list { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
.evidence-chips span, .event-list span { padding: .45rem .65rem; border: 1px solid var(--line-strong); color: var(--muted-strong); font-size: .72rem; }
.event-list .event-highlight { border-color: var(--accent); color: var(--ink); font-weight: 800; }
.event-list span { min-width: 5rem; text-align: center; }

.work-intro { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(16rem, .65fr); gap: 3rem; align-items: end; margin: clamp(2.5rem, 3.5vw, 3rem) 0 2.5rem; padding-top: clamp(2.5rem, 3.5vw, 3rem); border-top: 1px solid var(--line); }
.work-intro .mini-label { margin-bottom: .65rem; }
.work-intro h3 { margin: 0; font-size: clamp(2.25rem, 3.7vw, 3.45rem); line-height: 1.08; letter-spacing: -.05em; }
.work-intro > p { max-width: 28rem; margin: 0 0 .35rem; color: var(--muted); }

.project { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-soft); }
.project-featured { display: grid; grid-template-columns: 1.25fr .75fr; margin-bottom: 1.25rem; }
.project-media { position: relative; display: block; min-height: 100%; overflow: hidden; background: #e9edf0; }
.project-media::after { content: "OPEN ↗"; position: absolute; z-index: 2; top: 1rem; right: 1rem; padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.68); background: rgba(4, 11, 20, .7); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .1em; opacity: .88; transition: background-color .2s ease, transform .2s ease; }
.project-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9) contrast(1.02); transition: transform .55s ease, filter .3s ease; }
.project-media:hover img, .project-media:focus-visible img { transform: scale(1.025); }
.project-media:hover img, .project-media:focus-visible img { filter: saturate(1) contrast(1.02); }
.project-media:hover::after, .project-media:focus-visible::after { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.project-copy { padding: clamp(1.6rem, 3vw, 2.6rem); }
.project-copy h3 { margin: .75rem 0 .2rem; font-size: clamp(2rem, 3.3vw, 3.6rem); line-height: 1; letter-spacing: -.055em; }
.project-featured .project-copy h3 { font-size: clamp(1.9rem, 2.6vw, 3rem); line-height: 1.08; letter-spacing: -.045em; }
.project-subtitle { color: var(--muted-strong); font-size: .92rem; }
.project-copy > p:not(.project-type):not(.project-subtitle) { color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.6rem 0; padding: 0; list-style: none; }
.tag-list li { padding: .4rem .58rem; border: 1px solid var(--line-strong); color: var(--muted-strong); font-size: .72rem; }
.project-links { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.7rem; }
.project-links a, .paper-item > a { min-height: 40px; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .72rem; border: 1px solid var(--accent); font-size: .8rem; font-weight: 760; transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease; }
.project-links a, .paper-item > a { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.project-links a::after, .paper-item > a::after { content: "↗"; color: currentColor; font-size: .95rem; font-weight: 850; line-height: 1; transition: transform .2s ease; }
.project-links a:hover, .project-links a:focus-visible, .paper-item > a:hover, .paper-item > a:focus-visible { border-color: var(--accent-hover); background: var(--accent-hover); box-shadow: none; transform: translateY(-2px); }
.project-links a:hover::after, .project-links a:focus-visible::after, .paper-item > a:hover::after, .paper-item > a:focus-visible::after { transform: translate(.12rem, -.12rem); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.project-compact { display: grid; grid-template-rows: 270px 1fr; }
.project-compact .project-copy h3 { font-size: clamp(1.9rem, 3vw, 3rem); }
.project-wide { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
.project-wide .project-media { min-height: 360px; }

.paper-list { border-top: 1px solid var(--line); }
.paper-item { position: relative; display: grid; grid-template-columns: 5rem 1fr auto; gap: 2rem; align-items: start; padding: 1.8rem 1rem; border-bottom: 1px solid var(--line); transition: background-color .2s ease; }
.paper-item::before { content: ""; position: absolute; top: 1.8rem; bottom: 1.8rem; left: 0; width: 2px; background: var(--accent); opacity: 0; transition: opacity .2s ease; }
.paper-item:hover { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.paper-item:hover::before { opacity: 1; }
.paper-year { color: var(--muted); font-variant-numeric: tabular-nums; }
.paper-item h3 { max-width: 930px; margin: .4rem 0 .55rem; font-size: clamp(1.12rem, 2vw, 1.5rem); line-height: 1.35; font-weight: 560; letter-spacing: -.02em; }
.paper-item p:not(.paper-venue) { margin: 0; color: var(--muted); font-size: .9rem; }
.paper-item > a { align-self: center; }

.demo-grid { width: min(100%, 960px); display: grid; grid-template-columns: 1fr; gap: clamp(3.5rem, 6vw, 5.5rem); margin: 0 auto; }
.demos-section .section-heading-row p { max-width: none; font-size: clamp(.72rem, 1.15vw, 1rem); overflow-wrap: anywhere; white-space: normal; }
.demo-card { position: relative; padding: 1rem 1rem 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-soft); transition: border-color .2s ease, transform .2s ease; }
.demo-card::before { content: "PLAY"; position: absolute; z-index: 2; top: 1rem; right: 1rem; display: grid; width: 3.2rem; height: 3.2rem; place-items: center; border: 1px solid rgba(255,255,255,.55); background: var(--play-bg); color: #fff; font-size: .61rem; letter-spacing: .1em; }
.demo-card img { width: 100%; height: auto; margin-bottom: 1.25rem; border-radius: 9px; object-fit: contain; display: block; filter: saturate(.86); transition: filter .25s ease; }
.demo-card:hover, .demo-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.demo-card:hover img, .demo-card:focus-visible img { filter: saturate(1.08); }
.demo-card h3 { margin: .35rem 0 0; font-size: clamp(1.6rem, 2.4vw, 2.15rem); }
.demo-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1.15rem; }
.demo-fact { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-content: start; margin: 0; padding: .9rem 1rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel-glass); }
.demo-fact > strong { padding-top: .1rem; color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.demo-fact > span { color: var(--muted-strong); font-size: .84rem; line-height: 1.65; }
.demo-fact b { color: var(--ink); font-weight: 750; }

.contact-section { margin: clamp(3rem, 5vw, 5rem) 0; padding: clamp(2rem, 4vw, 3.5rem); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 14px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, var(--panel)), var(--panel-glass) 62%); }
.contact-section h2 { max-width: 1000px; margin: 1.15rem 0 2.25rem; font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.3; letter-spacing: -.03em; }
@media (min-width: 1021px) {
  .contact-section h2 {
    max-width: none;
    font-size: clamp(1.5rem, 2vw, 1.95rem);
    line-height: 1.3;
    letter-spacing: -.03em;
    white-space: nowrap;
  }
  .contact-section h2 br { display: none; }
  html[lang="en"] .contact-section h2 { font-size: clamp(1.2rem, 1.6vw, 1.55rem); }
}
.contact-row { display: flex; flex-wrap: wrap; gap: .7rem; color: var(--muted-strong); }
.contact-row a { min-height: 40px; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .7rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: none; font-weight: 760; transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease; }
.contact-row a:not(.email-icon-link--contact)::after { content: "↗"; color: currentColor; font-size: .9rem; font-weight: 850; }
.contact-row a.email-icon-link--contact { width: auto; height: auto; display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border: 1px solid var(--accent); }
.contact-row a:hover, .contact-row a:focus-visible { border-color: var(--accent-hover); background: var(--accent-hover); box-shadow: none; transform: translateY(-2px); }

footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
footer span:nth-child(2) { text-align: center; }
footer a { justify-self: end; display: inline-flex; align-items: center; gap: .35rem; padding-bottom: .15rem; border-bottom: 1px solid var(--line-strong); color: var(--muted-strong); transition: border-color .2s ease, color .2s ease; }
footer a::after { content: "↑"; color: var(--accent); font-weight: 800; }
footer a:hover, footer a:focus-visible { border-color: var(--accent); color: var(--ink); }

.js .reveal { opacity: 1; transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (max-width: 1020px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .site-header nav { justify-self: center; gap: 1rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 720px; }
  .hero-visual { margin-left: 1rem; }
  .identity-strip { grid-template-columns: 1fr 1fr; }
  .section-heading-row, .about-grid, .work-intro { grid-template-columns: 1fr; }
  .section-heading-row { gap: 1.5rem; }
  .work-intro { gap: 1.25rem; }
  .career-grid { grid-template-columns: 1fr 1fr; }
  .career-grid article:nth-child(2) { border-right: 0; }
  .career-grid article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .system-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 0; }
  .system-card h3 { font-size: clamp(1.55rem, 5vw, 2rem); white-space: normal; }
  .project-featured { grid-template-columns: 1fr; }
  .project-featured .project-media { min-height: 420px; }
}

@media (max-width: 800px) {
  :root { --header-height: 72px; }
  .site-header { grid-template-columns: 1fr auto; }
  .header-actions { margin-right: 3.7rem; }
  .header-email { display: none; }
  .menu-toggle { position: absolute; right: 0; top: 17px; display: grid; width: 42px; height: 38px; place-content: center; gap: 7px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
  .menu-toggle span { display: block; width: 18px; height: 1px; background: var(--ink); transition: transform .2s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .site-header nav { position: fixed; top: var(--header-height); right: auto; bottom: auto; left: 50%; width: 100vw; min-height: calc(100vh - var(--header-height)); display: none; align-content: start; justify-self: auto; padding: 3rem 1.5rem; background: var(--bg); border-top: 1px solid var(--line); transform: translateX(-50%); }
  .site-header nav.is-open { display: grid; }
  .site-header nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: 1.35rem; color: var(--ink); }
  .hero { padding-top: 3rem; }
  .hero-visual { order: -1; }
  .section-heading-row h2, .about-grid h2, .contact-section h2 { font-size: clamp(2.25rem, 8vw, 3.1rem); line-height: 1.1; letter-spacing: -.045em; }
  .contact-section h2 { max-width: 38rem; margin: 1rem 0 2rem; font-size: clamp(1.35rem, 4.6vw, 1.65rem); line-height: 1.35; letter-spacing: -.025em; }
  .about-grid h2 br, #impact-title br { display: none; }
  .work-intro h3 { font-size: clamp(2rem, 7vw, 2.75rem); }
  .profile-notes, .outcome-grid { grid-template-columns: 1fr; }
  .flywheel-heading { grid-template-columns: 1fr; }
  .flywheel-heading > span { grid-column: 1; grid-row: auto; margin-top: .35rem; }
  .flywheel-track { grid-template-columns: 1fr; gap: .85rem; }
  .flywheel-track::before { display: none; }
  .flywheel-step { min-height: 86px; grid-template-columns: 3.8rem 1fr; grid-template-rows: auto; align-items: center; justify-items: stretch; }
  .step-top .flywheel-card, .step-bottom .flywheel-card { grid-column: 2; grid-row: 1; }
  .flywheel-card { width: 100%; max-width: none; min-height: 86px; padding: .9rem 1rem; text-align: left; }
  .step-top .step-stem, .step-bottom .step-stem { display: none; }
  .step-node { grid-column: 1; grid-row: 1; align-self: center; width: 48px; height: 48px; box-shadow: 0 0 0 5px var(--panel); }
  .flywheel-step:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -.95rem; left: 1.2rem; transform: none; }
  .flywheel-insights { grid-template-columns: 1fr; margin: 1.6rem 0 0; }
  .flywheel-return { min-height: 72px; margin: 1rem 0 0; justify-content: space-between; border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 8px; }
  .flywheel-return .loop-terminal { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .project-wide { grid-column: auto; grid-template-columns: 1fr; grid-template-rows: 270px 1fr; }
  .project-wide .project-media { min-height: 0; }
  .paper-item { grid-template-columns: 3.75rem 1fr; gap: 1.25rem; }
  .paper-item > a { grid-column: 2; justify-self: start; }
  .demo-grid { grid-template-columns: 1fr; gap: 2rem; }
  .demo-facts { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr auto; }
  footer span:nth-child(2) { display: none; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(calc(100% - 2rem), var(--max)); }
  .hero { padding: 2.25rem 0 3rem; gap: 2.75rem; }
  h1 { font-size: clamp(3.3rem, 15vw, 4.4rem); }
  .hero-actions { flex-direction: column; }
  .button { justify-content: center; text-align: center; }
  .hero-visual { margin-left: 0; padding: .45rem; border-radius: 12px; }
  .hero-visual img { border-radius: 8px; }
  .hero-visual::before { top: 1rem; left: 1rem; font-size: .5rem; }
  .hero-visual figcaption { flex-direction: column; gap: .2rem; }
  .identity-strip { grid-template-columns: 1fr; }
  .identity-strip > div, .identity-strip > div + div { grid-column: auto; padding: 1.25rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .identity-strip > div:first-child { border-top: 0; }
  .section { padding: 3.25rem 0; }
  .section-kicker { margin-bottom: 1.75rem; }
  .section-heading-row h2, .about-grid h2, .contact-section h2 { font-size: clamp(2.1rem, 10vw, 2.8rem); }
  .contact-section h2 { margin-bottom: 1.75rem; font-size: clamp(1.2rem, 5.2vw, 1.45rem); line-height: 1.4; letter-spacing: -.02em; }
  .work-intro { margin-top: 2.75rem; padding-top: 2.5rem; }
  .work-intro h3 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .career-grid, .scale-grid { grid-template-columns: 1fr; }
  .career-grid article, .career-grid article:nth-child(2) { min-height: 230px; border: 1px solid var(--line); }
  .scale-grid .metric-card, .scale-grid .metric-card:nth-child(2), .scale-grid .metric-card:last-child { min-height: 340px; padding: 1.2rem 1.3rem; border: 1px solid var(--line); }
  .metric-card::after { right: .8rem; font-size: 5.5rem; }
  .project-featured .project-media { min-height: 250px; }
  .project-compact, .project-wide { grid-template-rows: 210px 1fr; }
  .paper-item { grid-template-columns: 1fr; gap: .8rem; }
  .paper-item > a { grid-column: auto; }
  .paper-item { padding: 1.5rem .25rem; }
  .demo-card { padding: .55rem .55rem 1rem; border-radius: 11px; }
  .demo-card img { border-radius: 7px; }
  .contact-section { margin: 2.5rem 0; padding: 1.4rem; border-radius: 12px; }
  footer { grid-template-columns: 1fr; }
  footer a { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
