/* Junzhe Hu: shared styles for index.html, publications.html and 404.html.
   Look: Apple-style dark pages. Black canvas, system (SF) type, quiet greys; accents taken from
   the MIT EECS cube (magenta / purple / cyan faces), lifted slightly for legibility on black.
   Bump the ?v= query in every page after editing. */

:root {
  --bg: #000;
  --tile: #161617;
  --tile-2: #1d1d1f;
  --tile-3: #2c2c2e;
  --hair: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  /* MIT EECS logo: magenta #c6168d (top face), purple #662d91 (left), cyan #00a1c7 (right) */
  --eecs-magenta: #c6168d;
  --eecs-purple: #662d91;
  --eecs-cyan: #00a1c7;
  --link: #1aaed6;                   /* cyan face: links and controls */
  --button: #6f33a3;                 /* purple face: the one filled button */
  --button-hover: #7c3db3;
  --accent: #e43ba6;                 /* magenta face: highlights */
  --spectrum: linear-gradient(90deg, #e43ba6 0%, #9c59cf 50%, #12bce2 100%);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --max: 980px;
  --gutter: 22px;
  --nav-h: 48px;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
body { min-height: 100vh; background: var(--bg); }
::selection { background: rgba(0, 161, 199, 0.4); color: #fff; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
strong { color: var(--text); font-weight: 600; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Section titles */
h2 {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 28px;
}

/* Gradient highlight, echoing the red/blue of the flow videos */
.research-accent, .proj-claim {
  background: var(--spectrum);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Buttons and links in Apple's manner: one filled pill, then text links with a chevron */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  font-size: 17px; line-height: 1.17648; font-weight: 400; letter-spacing: -0.022em;
  color: #fff;
  background: var(--button);
  border-radius: 980px;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--button-hover); color: #fff; text-decoration: none; }
.cta { font-size: 17px; line-height: 1.17648; white-space: nowrap; }
.cta::after {
  content: "\203A";
  display: inline-block;
  margin-left: 0.3em;
  font-size: 1.25em; line-height: 0;
  position: relative; top: 0.06em;
}

/* ========== NAV ========== */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(22, 22, 23, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
          backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.topnav-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  height: var(--nav-h);
  margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand {
  font-size: 19px; line-height: 1; font-weight: 600; letter-spacing: 0.012em;
  color: var(--text);
  white-space: nowrap;
}
.nav-brand:hover { color: var(--text); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 12px; line-height: 1; letter-spacing: -0.01em;
  color: rgba(245, 245, 247, 0.8);
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }

/* ========== HERO ========== */
.hero-band { position: relative; overflow: hidden; background: var(--bg); }
/* Background: simulated swimmer and its vortex wake. The whole 5:2 field is shown,
   centred in the band, with every edge feathered so the wake never ends in a hard cut. */
.hero-bg {
  position: absolute; top: 0; left: 50%;
  height: 100%; width: auto;
  aspect-ratio: 5 / 2;
  transform: translateX(-50%);
  object-fit: cover;
  opacity: 0.85;
  mix-blend-mode: screen;          /* black sim background drops out */
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 14%, #000 84%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, transparent 0, #000 14%, #000 84%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-composite: intersect;
}
.hero-wrap { position: relative; z-index: 1; }
.hero {
  display: flex; align-items: center; gap: 48px;
  padding: 108px 0 116px;
}
.avatar-ring {
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.85);
}
.avatar {
  width: 168px; height: 168px;
  border-radius: 50%;
  background: var(--tile) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.hero-text { flex: 1; min-width: 0; position: relative; }
/* soft dark halo so the text stays legible over the moving wake */
.hero-text::before {
  content: "";
  position: absolute; inset: -40px -64px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0) 100%);
}
.hero-text h1, .hero-sub { text-shadow: 0 1px 16px rgba(0, 0, 0, 0.7); }
.hero-text h1 {
  font-size: 56px; line-height: 1.07143; font-weight: 600; letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 14px;
}
.hero-sub { font-size: 19px; line-height: 1.42; letter-spacing: 0.012em; color: var(--text-2); }
.hero-sub strong {
  font-weight: 500;
  background: var(--spectrum);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
}
.mit { color: var(--text); font-weight: 600; }

.interests {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 24px 0 32px;
}
.interests li {
  padding: 6px 13px;
  font-size: 12px; line-height: 1.34; letter-spacing: -0.01em;
  color: #e8e8ed;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }

.hero-fig { width: 360px; margin-left: auto; flex-shrink: 0; }
.hero-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r);
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.hero-visual img { width: 100%; height: auto; display: block; transform: translateY(-10%); }

/* Play / pause for the background video, in the style of Apple's hero controls */
.flow-toggle {
  position: absolute; right: var(--gutter); bottom: 24px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  border: 0; border-radius: 50%;
  -webkit-backdrop-filter: saturate(180%) blur(12px);
          backdrop-filter: saturate(180%) blur(12px);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.flow-toggle:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.flow-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.flow-toggle .i-play { display: none; margin-left: 2px; }
.flow-toggle.paused .i-play { display: block; }
.flow-toggle.paused .i-pause { display: none; }

/* ========== PAGE GRID ========== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  grid-template-areas:
    "intro side"
    "proj  proj";
  column-gap: 80px;
  padding-top: 120px;
}
.intro    { grid-area: intro; }
.sidebar  { grid-area: side; }
.projects { grid-area: proj; margin-top: 168px; }
.intro section + section { margin-top: 104px; }

/* ========== ABOUT ========== */
.about p { font-size: 19px; line-height: 1.5; letter-spacing: 0.012em; color: var(--text-2); }
.about p + p { margin-top: 22px; }
.about a strong { color: inherit; font-weight: inherit; }

/* ========== NEWS ========== */
.news-list { list-style: none; border-top: 1px solid var(--hair); }
.news-list li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
  color: var(--text-2);
}
.news-list em { color: #d2d2d7; }
.news-date {
  padding-top: 2px;
  font-size: 14px; line-height: 1.5; letter-spacing: -0.01em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.news-list li:first-child .news-date { color: var(--accent); font-weight: 600; }
.news-list.collapsed .news-old { display: none; }
.news-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 20px;
  font: inherit; font-size: 17px;
  color: var(--link);
  background: none; border: 0; padding: 0;
  cursor: pointer;
}
.news-toggle::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.35s var(--ease);
}
.news-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.news-toggle:hover { text-decoration: underline; text-underline-offset: 0.16em; }

/* ========== SIDEBAR ========== */
.sidebar { padding-top: 10px; }
.sidebar section + section { margin-top: 56px; }
.sidebar h2 { font-size: 21px; line-height: 1.19; letter-spacing: 0.011em; margin-bottom: 6px; }
.side-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
}
.side-row:last-child { border-bottom: 0; }
.side-logo {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff center / contain no-repeat;
}
.side-name { font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.side-detail { margin-top: 2px; font-size: 13px; line-height: 1.38; letter-spacing: -0.01em; color: var(--text-3); }
.side-list { list-style: none; }
.side-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 15px; line-height: 1.4; letter-spacing: -0.01em;
  color: var(--text-2);
}
.side-list li:last-child { border-bottom: 0; }
.side-list li.hl { color: var(--text); font-weight: 600; }

/* ========== PROJECTS ========== */
.projects > h2 { margin-bottom: 44px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.label-row .proj-label { margin-bottom: 0; }
.label-row.second { margin-top: 112px; }
.section-note { font-size: 12px; letter-spacing: -0.01em; color: var(--text-3); }
.proj-label {
  font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: 0.009em;
  color: var(--text);
  margin-bottom: 24px;
}

/* Featured tiles */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.proj {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--tile);
}
.proj-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}
.proj-media img, .proj-media video, .paper-thumb img, .paper-thumb video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 1.2s var(--ease);
}
.proj:hover .proj-media > img, .proj:hover .proj-media > video { transform: scale(1.03); }
.proj-media.sim { background: #060c24; }
.proj-media.sim video, .proj-media.flight video { object-fit: cover; }
.proj-media.flight { background: #15141a; }

/* time-synced overlay on the collision video */
.hud {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0) 32%);
}
.hud-speed {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 10px;
  font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: 0;
  color: #fff;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.35s ease;
}
.hud-speed.slow { background: rgba(198, 22, 141, 0.88); }
.hud-steps {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; gap: 6px;
  list-style: none;
}
.hud-steps li {
  position: relative;
  flex: 1;
  padding-top: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: 0;
  color: rgba(255, 255, 255, 0.5);
  border-top: 2px solid rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  transition: color 0.3s ease;
}
.hud-steps li::before {
  content: "";
  position: absolute; top: -2px; left: 0;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: #fff;
}
.hud-steps li.on { color: #fff; }

.proj-body {
  flex: 1;
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px 28px 30px;
}
.proj-title { font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: 0.011em; color: var(--text); }
.proj-claim { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.proj-desc { font-size: 15px; line-height: 1.47; letter-spacing: -0.01em; color: var(--text-2); }
.proj-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
}
.proj-note { font-size: 12px; line-height: 1.33; letter-spacing: -0.01em; color: var(--text-3); }

/* Selected papers */
.paper-list { display: grid; }
.paper {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--hair);
}
.paper:first-child { padding-top: 0; }
.paper:last-child { border-bottom: 0; }
.paper-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: #000;
}
.paper-thumb.figure { background: #fff; }
.paper-thumb.figure img { padding: 10px; }
.paper:hover .paper-thumb > *, .pub:hover .paper-thumb > * { transform: scale(1.03); }
.paper-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eyebrow { font-size: 12px; line-height: 1.33; font-weight: 600; letter-spacing: -0.01em; color: var(--text-3); }
.eyebrow.award { color: var(--accent); }
.paper .proj-desc { margin-top: 2px; }
.proj-paper { font-size: 13px; line-height: 1.45; letter-spacing: -0.01em; color: var(--text-3); }
.proj-paper em { color: var(--text-2); }

.links { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 6px; font-size: 14px; letter-spacing: -0.016em; }
.links a::after, .pub-actions a::after { content: "\2197"; margin-left: 0.18em; font-size: 0.88em; }
.proj-foot .links { margin-top: 0; }
.more-row { margin-top: 44px; padding-left: calc(264px + 40px); }

/* ========== CODA + FOOTER ========== */
.coda {
  position: relative;
  width: min(100%, 760px);
  margin: 120px auto 0;
  aspect-ratio: 1040 / 318;
  pointer-events: none;
}
.coda video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 40% 50%, #000 42%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 78% at 40% 50%, #000 42%, transparent 100%);
}
footer {
  margin-top: 24px;
  padding: 18px 0 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  font-size: 12px; line-height: 1.33; letter-spacing: -0.01em;
  color: var(--text-3);
  border-top: 1px solid var(--hair);
}
footer a { color: var(--text-2); }

/* ========== MOTION ========== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ========== PUBLICATIONS PAGE ========== */
.page-head { padding-top: 104px; padding-bottom: 8px; }   /* keep .wrap's side padding */
.page-head h1 {
  font-size: 56px; line-height: 1.07143; font-weight: 600; letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 18px;
}
.page-head p { max-width: 680px; font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; color: var(--text-2); }
.pub-index { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.pub-index a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  font-size: 14px; line-height: 1.29; letter-spacing: -0.016em;
  color: var(--text);
  border-radius: 980px;
  background: var(--tile-2);
  transition: background 0.2s ease;
}
.pub-index a:hover { background: var(--tile-3); text-decoration: none; }
.pub-index .n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.pubs { padding: 88px 0 24px; }
.pub-group + .pub-group { margin-top: 104px; }
.pub-group h2 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; margin-bottom: 20px; }
.pub-list { display: grid; }
.pub {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  padding: 30px 0;
  border-bottom: 1px solid var(--hair);
}
.pub:first-child { padding-top: 12px; }
.pub:last-child { border-bottom: 0; }
.pub-side { align-self: start; min-width: 0; }
/* venue tile in place of a thumbnail */
.pub-mark {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px 17px;
  border-radius: var(--r-sm);
  background: var(--tile);
}
.pub-mark b { font-size: 15px; line-height: 1.27; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.pub-mark span { font-size: 12px; letter-spacing: -0.01em; color: var(--text-3); }
.pub-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pub-title { font-size: 19px; line-height: 1.32; font-weight: 600; letter-spacing: 0.012em; color: var(--text); }
.pub-authors { font-size: 14px; line-height: 1.5; letter-spacing: -0.016em; color: var(--text-2); }
.pub-venue {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 14px; line-height: 1.43; letter-spacing: -0.016em;
  color: var(--text-3);
}
.pub-venue em { color: #d2d2d7; }
.pub-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px;
  margin-top: 6px;
  font-size: 14px; letter-spacing: -0.016em;
}
.pub-toggle {
  font: inherit; font-size: 14px; letter-spacing: -0.016em;
  color: var(--link);
  background: none; border: 0; padding: 0;
  cursor: pointer;
}
.pub-toggle::after { content: "+"; display: inline-block; width: 0.75em; margin-left: 0.2em; }
.pub-toggle[aria-expanded="true"]::after { content: "\2212"; }
.pub-toggle:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.pub-panel {
  margin-top: 8px;
  padding: 16px 18px;
  font-size: 14px; line-height: 1.6; letter-spacing: -0.016em;
  color: var(--text-2);
  border-radius: var(--r-sm);
  background: var(--tile);
}
.pub-panel.bib { position: relative; padding: 0; background: none; }
.pub-panel pre {
  margin: 0;
  padding: 16px 84px 16px 18px;
  font-family: var(--mono);
  font-size: 12px; line-height: 1.6; letter-spacing: 0;
  color: #d2d2d7;
  border-radius: var(--r-sm);
  background: var(--tile);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  padding: 5px 12px;
  font: inherit; font-size: 12px; letter-spacing: -0.01em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 0; border-radius: 980px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.18); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px; line-height: 1.33; font-weight: 500; letter-spacing: -0.01em;
  border-radius: 980px;
}
.tag-award  { background: rgba(198, 22, 141, 0.2); color: #f06bbd; }
.tag-pub    { background: rgba(255, 255, 255, 0.08); color: var(--text-2); }
.tag-review { background: rgba(255, 255, 255, 0.06); color: var(--text-3); }
.tag-accept { background: rgba(48, 209, 88, 0.14); color: #30d158; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1068px) {
  .hero-fig { width: 300px; }
  .hero-text h1 { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; }
  .layout { grid-template-columns: minmax(0, 1fr) 248px; column-gap: 56px; }
  .paper { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .more-row { padding-left: calc(220px + 32px); }
}
@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 28px; padding: 64px 0 88px; }
  .avatar { width: 128px; height: 128px; }
  .hero-fig { width: 100%; max-width: 440px; margin-left: 0; }
  /* portrait clip on narrow screens: the swimmer travels down through the stacked hero */
  .hero-bg {
    left: 0; transform: none;
    width: 100%; aspect-ratio: auto;
    opacity: 0.75;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "proj" "side";
    padding-top: 88px;
  }
  .projects { margin-top: 120px; }
  .sidebar {
    margin-top: 120px; padding-top: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px;
  }
  .sidebar section + section { margin-top: 0; }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  :root { --gutter: 20px; }
  h2 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; margin-bottom: 22px; }
  .nav-brand { font-size: 17px; }
  .nav-links { gap: 22px; }
  .nav-links a.nav-optional { display: none; }
  .hero-text h1 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
  .hero-sub { font-size: 17px; letter-spacing: -0.022em; }
  .about p { font-size: 17px; line-height: 1.53; letter-spacing: -0.022em; }
  .intro section + section { margin-top: 88px; }
  .news-list li { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; font-size: 15px; letter-spacing: -0.01em; }
  .news-date { font-size: 13px; padding-top: 1px; }
  .projects > h2 { margin-bottom: 32px; }
  .proj-label { font-size: 21px; margin-bottom: 20px; }
  .label-row { margin-bottom: 20px; }
  .label-row.second { margin-top: 88px; }
  .feat-grid { grid-template-columns: minmax(0, 1fr); }
  .proj-body { padding: 24px 24px 28px; }
  .paper { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 32px 0; }
  .more-row { padding-left: 0; margin-top: 32px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .coda { margin-top: 88px; }
  footer { flex-direction: column; }

  .page-head { padding-top: 64px; }
  .page-head h1 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
  .page-head p { font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; }
  .pubs { padding-top: 64px; }
  .pub-group + .pub-group { margin-top: 80px; }
  .pub-group h2 { font-size: 28px; line-height: 1.14; letter-spacing: 0.007em; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 26px 0; }
  .pub-side.is-mark { display: none; }      /* the venue is repeated in the text */
  .pub-title { font-size: 17px; letter-spacing: -0.022em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .proj:hover .proj-media > *, .paper:hover .paper-thumb > *, .pub:hover .paper-thumb > * { transform: none; }
  .news-toggle::after { transition: none; }
}
