/* Junzhe Hu: shared styles for index.html and publications.html.
   Bump the ?v= query in both pages after editing so browsers fetch the new file. */

:root {
  --bg: #0b0e14;
  --bg-elevated: #11151d;
  --card-bg: #141923;
  --border: #232a36;
  --border-strong: #34404f;
  --text: #c8cfd8;
  --text-soft: #8a94a3;
  --text-muted: #6a7382;
  --text-strong: #f0f3f7;
  --accent: #b72f3f;        /* MIT-inspired deep red */
  --accent-bright: #e0566a;
  --blue: #8ab4d8;
  --link: #8ab4d8;
  --link-hover: #b9d3eb;
  --font: 'Lato', Verdana, Helvetica, Arial, sans-serif;
  --nav-h: 56px;
  --radius: 12px;
}

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

html {
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; background: var(--bg); }
::selection { background: rgba(183,47,63,0.45); color: #fff; }

a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
a:hover { color: var(--link-hover); border-bottom-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
strong { color: var(--text-strong); font-weight: 700; }

/* ========== NAV ========== */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 14, 20, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1040px; margin: 0 auto;
  height: var(--nav-h);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 28px;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-strong);
  border-bottom: none;
  letter-spacing: 0.01em;
}
.nav-brand:hover { color: var(--text-strong); border-bottom: none; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  position: relative;
  color: var(--text-soft);
  font-size: 0.92rem;
  padding: 4px 0;
  border-bottom: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-strong); border-bottom: none; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; border-radius: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.nav-links a.active::after { transform: scaleX(1); }
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; pointer-events: none;
}
.progress span {
  display: block; height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-bright) 55%, var(--blue));
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }

/* ========== HERO ========== */
.hero-band {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 460px at 82% -160px, rgba(183,47,63,0.12), transparent 70%),
    radial-gradient(700px 380px at 0% -120px, rgba(138,180,216,0.06), transparent 70%);
}
/* 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.8;
  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; gap: 34px; align-items: center;
  padding: 64px 0 60px;
}
.avatar-ring {
  flex-shrink: 0;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, rgba(224,86,106,0.95), rgba(138,180,216,0.75), rgba(224,86,106,0.12), rgba(224,86,106,0.95));
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.9);
}
.avatar {
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: var(--bg-elevated) center/cover no-repeat;
}
.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: -36px -56px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(11,14,20,0.5), rgba(11,14,20,0.22) 60%, rgba(11,14,20,0) 100%);
}
.hero-text h1, .hero-sub { text-shadow: 0 1px 12px rgba(11,14,20,0.85); }
.hero-text h1 {
  font-size: 2.45rem;
  font-weight: 900;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero-sub { font-size: 1rem; color: var(--text-soft); line-height: 1.6; }
.mit { color: var(--accent-bright); font-weight: 700; }

.interests {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 16px 0 18px;
}
.interests li {
  font-size: 0.8rem;
  color: var(--text);
  padding: 2px 9px;
  border-radius: 4px;
  background: rgba(14,18,26,0.62);
  border: 1px solid rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

.hero-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px;
  font-size: 0.86rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(20,25,35,0.7);
  backdrop-filter: blur(6px);
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.pill:hover {
  color: var(--text-strong);
  border-color: var(--accent);
  background: rgba(183,47,63,0.16);
  transform: translateY(-1px);
}

.hero-fig { width: 380px; margin-left: auto; flex-shrink: 0; }
.hero-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.9);
}
.hero-visual img {
  width: 100%; height: auto;
  display: block;
  transform: translateY(-10%);
}
.hero-visual::after {
  content: "";
  position: absolute; inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 14px 8px var(--bg);
}
.flow-toggle {
  position: absolute; right: 28px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  letter-spacing: 0.02em;
}
.flow-toggle:hover { color: var(--text-soft); }
.flow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(224,86,106,0.18);
}
.flow-toggle.paused .flow-dot { background: var(--text-muted); box-shadow: none; }
.flow-state {
  color: var(--text-soft);
  border-bottom: 1px solid var(--border-strong);
}

/* ========== PAGE GRID ========== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-areas:
    "intro side"
    "proj  proj";
  column-gap: 56px;
  row-gap: 56px;
  padding: 48px 0 64px;
}
.intro    { grid-area: intro; }
.sidebar  { grid-area: side; }
.projects { grid-area: proj; }

section { margin-bottom: 48px; }
.projects, .intro section:last-child, .sidebar section:last-child { margin-bottom: 0; }

h2, .section-head {
  position: relative;
  margin-bottom: 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
h2 {
  font-size: 1.47rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.005em;
}
h2::after, .section-head::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 36px; height: 2px;
  background: var(--accent);
}
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.section-head h2 { margin: 0; padding: 0; border: none; }
.section-head h2::after { display: none; }
.section-note { font-size: 0.82rem; color: var(--text-muted); }
.h-num {
  display: inline-block;
  min-width: 2.1em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.06em;
  vertical-align: 0.28em;
  font-variant-numeric: tabular-nums;
}

/* ========== ABOUT ========== */
.about p { margin-bottom: 14px; font-size: 0.98rem; line-height: 1.65; }
.about p:last-child { margin-bottom: 0; }
.research-accent { color: var(--accent-bright); font-weight: 700; }

/* ========== NEWS (timeline) ========== */
.news-list {
  --date-w: 70px;
  --gap: 26px;
  list-style: none;
  position: relative;
}
.news-list::before {
  content: "";
  position: absolute;
  left: calc(var(--date-w) + var(--gap) / 2);
  top: 18px; bottom: 18px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0, var(--border-strong) 22%, var(--border) 100%);
}
.news-list li {
  position: relative;
  display: grid;
  grid-template-columns: var(--date-w) 1fr;
  gap: var(--gap);
  padding: 8px 0;
  font-size: 0.94rem;
}
.news-list li::before {
  content: "";
  position: absolute;
  left: calc(var(--date-w) + var(--gap) / 2 - 4px);
  top: 15px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--text-muted);
}
.news-list li:first-child::before {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,86,106,0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(224,86,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,86,106,0); }
}
.news-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 2px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.news-list li:first-child .news-date { color: var(--accent-bright); font-weight: 700; }
.news-list.collapsed .news-old { display: none; }
.news-toggle {
  margin: 10px 0 0 calc(70px + 26px);
  font: inherit;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.news-toggle:hover { color: var(--accent-bright); }

/* ========== PROJECTS ========== */
.proj-label {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 16px;
}
.proj-label::after {
  content: "";
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.proj-label.second { margin-top: 44px; }

/* Featured cards */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.proj {
  position: relative;
  isolation: isolate;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #161c27, var(--card-bg));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.proj:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 26px 50px -28px rgba(0,0,0,0.9);
}
/* cursor-following glow on the card edge and surface */
.proj::before, .proj::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 2;
}
.proj::before {
  padding: 1px;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(224,86,106,0.75), rgba(138,180,216,0.35) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.proj::after {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(224,86,106,0.07), transparent 60%);
}
.proj:hover::before, .proj:hover::after { opacity: 1; }

.proj-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.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 .8s cubic-bezier(.2,.7,.2,1);
}
.proj:hover .proj-media > img, .proj:hover .proj-media > video { transform: scale(1.035); }
.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;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to top, rgba(4,5,9,0.72), rgba(4,5,9,0) 30%);
}
.hud-speed {
  position: absolute; top: 11px; right: 11px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; line-height: 1;
  padding: 6px 9px;
  border-radius: 999px;
  color: #e8ecf3;
  background: rgba(8,10,16,0.6);
  border: 1px solid rgba(255,255,255,0.16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .35s ease, border-color .35s ease;
}
.hud-speed.slow { background: rgba(183,47,63,0.82); border-color: rgba(240,120,136,0.9); }
.hud-steps {
  position: absolute; left: 12px; right: 12px; bottom: 10px;
  display: flex; gap: 6px;
  margin: 0; padding: 0; list-style: none;
}
.hud-steps li {
  position: relative;
  flex: 1;
  padding-top: 7px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  border-top: 2px solid rgba(255,255,255,0.2);
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
  transition: color .3s ease;
}
.hud-steps li::before {
  content: "";
  position: absolute; top: -2px; left: 0;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: var(--accent-bright);
}
.hud-steps li.on { color: #fff; }
.proj-claim {
  font-size: 0.98rem; font-weight: 700;
  color: #f2c4cb;
  line-height: 1.4;
}

.proj-body {
  flex: 1;
  display: flex; flex-direction: column; gap: 9px;
  padding: 18px 22px 20px;
}
.proj-title {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
}
.feat-grid .proj-title { font-size: 1.24rem; letter-spacing: -0.005em; }
.proj-desc { font-size: 0.92rem; line-height: 1.6; }
.proj-foot {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px dashed var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
}
.proj-note { font-size: 0.82rem; color: var(--text-muted); }

/* Selected papers: academic list */
.paper-list { display: grid; }
.paper {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.paper:first-child { padding-top: 6px; }
.paper:last-child { border-bottom: none; padding-bottom: 0; }
.paper-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  align-self: start;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.paper:hover .paper-thumb { border-color: var(--border-strong); box-shadow: 0 18px 36px -22px rgba(0,0,0,0.9); }
.paper:hover .paper-thumb > * { transform: scale(1.04); }
.paper-thumb.figure { background: #fff; }
.paper-thumb.figure img { padding: 10px; }
.paper-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.paper-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.paper .proj-title { font-size: 1.1rem; }
.proj-paper { font-size: 0.84rem; color: var(--text-soft); line-height: 1.5; }
.proj-paper em { color: var(--text); }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  padding: 2px 8px;
  border-radius: 4px;
}
.tag-award  { background: rgba(212,167,44,0.14); color: #e1b943; border: 1px solid rgba(212,167,44,0.35); }
.tag-pub    { background: rgba(120,150,200,0.10); color: #97afd0; border: 1px solid rgba(120,150,200,0.25); }
.tag-review { background: rgba(138,148,163,0.08); color: var(--text-soft); border: 1px solid rgba(138,148,163,0.22); }

.links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.86rem; }
.links a { border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; }
.links a::after { content: "↗"; margin-left: 3px; font-size: 0.82em; opacity: 0.7; }
.links a:hover { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }

/* ========== SIDEBAR ========== */
.sidebar section { margin-bottom: 36px; }
.sidebar h2 { font-size: 1.2rem; }

.side-row {
  display: flex; gap: 12px; align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.side-row:last-child { border-bottom: none; }
.side-logo {
  width: 36px; height: 36px;
  border-radius: 7px;
  background: #fff center/contain no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform .2s ease;
}
.side-row:hover .side-logo { transform: scale(1.06); }
.side-name { font-weight: 700; font-size: 0.9rem; color: var(--text-strong); line-height: 1.3; }
.side-detail { font-size: 0.8rem; color: var(--text-muted); margin-top: 1px; }

.side-list { list-style: none; }
.side-list li {
  font-size: 0.88rem;
  color: var(--text-soft);
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
}
.side-list li:last-child { border-bottom: none; }
.side-list li.hl { color: var(--text); }
.side-list li.hl::before { content: "★"; color: #e1b943; margin-right: 6px; font-size: 0.8em; }

/* ========== FOOTER ========== */
.coda {
  position: relative;
  width: min(100%, 720px);
  margin: 40px auto 0;
  aspect-ratio: 1040 / 318;
  pointer-events: none;
}
.coda video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  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 {
  position: relative;
  padding: 26px 0 34px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.82rem;
}
footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
}
footer a { color: var(--text-soft); }

/* ========== MOTION ========== */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.js .reveal { opacity: 0; }
.js .reveal.in {
  opacity: 1;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) backwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; }
  .js .reveal.in { animation: none; }
  .news-list li:first-child::before { animation: none; }
  .proj, .proj:hover, .pill:hover { transition: none; transform: none; }
  .proj:hover .proj-media > *, .paper:hover .paper-thumb > * { transform: none; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
  .hero-fig { width: 320px; }
}
@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 24px; padding: 40px 0 56px; }
  .avatar { width: 148px; height: 148px; }
  .hero-text h1 { font-size: 2.05rem; }
  .hero-fig { width: 100%; max-width: 429px; margin-left: 0; }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "proj" "side";
    row-gap: 48px;
    padding-top: 40px;
  }
  .topnav-inner { padding: 0 20px; }
  .flow-toggle { right: 20px; }
  /* portrait clip on narrow screens: the swimmer travels up through the stacked hero */
  .hero-bg {
    left: 0; transform: none;
    width: 100%; aspect-ratio: auto;
    opacity: 0.7;
    -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%);
  }
}
@media (max-width: 960px) {
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .feat-grid { grid-template-columns: minmax(0, 1fr); }
  .paper { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .topnav-inner { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .nav-links a.nav-optional { display: none; }
  .flow-toggle { right: 16px; }
  .news-list { --date-w: 58px; --gap: 22px; }
  .news-toggle { margin-left: calc(58px + 22px); }
  .paper { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .paper-thumb { aspect-ratio: 16 / 10; }
  .proj-body { padding: 16px 18px 18px; }
  footer { flex-direction: column; }
}

/* ========== HOMEPAGE: link to the full publication list ========== */
.more-row { margin-top: 26px; padding-left: calc(228px + 26px); }
.more-link {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px;
  font-size: 0.9rem; font-weight: 700;
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(20,25,35,0.7);
  transition: border-color .15s, background .15s;
}
.more-link span { color: var(--accent-bright); transition: transform .2s ease; }
.more-link:hover { color: var(--text-strong); border-color: var(--accent); background: rgba(183,47,63,0.16); }
.more-link:hover span { transform: translateX(3px); }

/* ========== PUBLICATIONS PAGE ========== */
.page-band {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 460px at 82% -160px, rgba(183,47,63,0.12), transparent 70%),
    radial-gradient(700px 380px at 0% -120px, rgba(138,180,216,0.06), transparent 70%);
}
.page-head { padding-top: 56px; padding-bottom: 40px; }   /* keep .wrap's side padding */
.page-head h1 {
  font-size: 2.45rem;
  font-weight: 900;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.page-head p { max-width: 640px; color: var(--text-soft); font-size: 1rem; line-height: 1.6; }
.pub-index { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pub-index a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px;
  font-size: 0.86rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(20,25,35,0.7);
  transition: color .15s, border-color .15s, background .15s;
}
.pub-index a:hover { color: var(--text-strong); border-color: var(--accent); background: rgba(183,47,63,0.16); }
.pub-index .n { font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.pubs { padding: 48px 0 16px; }
.pub-group { margin-bottom: 60px; }
.pub-list { display: grid; }
.pub {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.pub:first-child { padding-top: 4px; }
.pub:last-child { border-bottom: none; padding-bottom: 0; }
.pub-side { align-self: start; min-width: 0; }
.pub:hover .paper-thumb { border-color: var(--border-strong); box-shadow: 0 18px 36px -22px rgba(0,0,0,0.9); }
.pub:hover .paper-thumb > * { transform: scale(1.04); }
/* venue mark in place of a thumbnail */
.pub-mark {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px 12px;
  border: 1px solid var(--border);
  border-left: 2px solid rgba(224,86,106,0.55);
  border-radius: 8px;
  background: linear-gradient(160deg, #161c27, var(--card-bg));
}
.pub-mark b { font-size: 0.98rem; font-weight: 900; color: var(--text-strong); line-height: 1.25; letter-spacing: 0.01em; }
.pub-mark span { font-size: 0.76rem; color: var(--text-muted); letter-spacing: 0.02em; }
.pub-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pub-title { font-size: 1.04rem; font-weight: 700; color: var(--text-strong); line-height: 1.38; }
.pub-authors { font-size: 0.88rem; color: var(--text-soft); line-height: 1.55; }
.pub-venue { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.86rem; color: var(--text); }
.pub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 4px; font-size: 0.86rem; }
.pub-actions a { border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; }
.pub-actions a::after { content: "↗"; margin-left: 3px; font-size: 0.82em; opacity: 0.7; }
.pub-actions a:hover { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }
.pub-toggle {
  font: inherit; font-size: 0.86rem;
  color: var(--text-soft);
  background: none; border: none;
  padding: 0 0 1px;
  border-bottom: 1px dashed var(--border-strong);
  cursor: pointer;
}
.pub-toggle::after { content: "+"; display: inline-block; width: 0.7em; margin-left: 4px; color: var(--text-muted); }
.pub-toggle[aria-expanded="true"]::after { content: "−"; }
.pub-toggle:hover, .pub-toggle[aria-expanded="true"] { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }
.pub-panel { margin-top: 6px; font-size: 0.9rem; line-height: 1.65; color: var(--text-soft); }
.pub-panel.bib { position: relative; }
.pub-panel pre {
  margin: 0;
  padding: 12px 76px 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem; line-height: 1.6;
  color: var(--text);
  background: #0e121a;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font: inherit; font-size: 0.74rem;
  color: var(--text-soft);
  background: rgba(20,25,35,0.92);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text-strong); border-color: var(--accent); }
.tag-accept { background: rgba(63,185,80,0.10); color: #6dc581; border: 1px solid rgba(63,185,80,0.25); }

@media (max-width: 700px) {
  .more-row { padding-left: calc(150px + 18px); }
  .pub { grid-template-columns: 132px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
  .more-row { padding-left: 0; }
  .page-head { padding-top: 40px; padding-bottom: 30px; }
  .page-head h1 { font-size: 2.05rem; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pub-side.is-mark { display: none; }      /* the venue is repeated in the text */
  .pub .paper-thumb { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  .pub:hover .paper-thumb > * { transform: none; }
  .more-link:hover span { transform: none; }
}
