/* ==========================================================================
   Profile card style — inspired by jason-ding.com (Hugo Blox "academic-cv").
   Plain CSS. Tokens: light on :root, dark on :root[data-theme="dark"], and the
   same dark values for the OS setting when no theme has been applied (no JS).
   ========================================================================== */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Warm paper palette (same family as the Warm cards style) */
  --bg: #f8f6f3;
  --bg-top: #fbfaf7;
  --bg-bottom: #f1e8dd;
  --accent: #d97b3f;            /* terracotta, decorative: dots, rails, bars */
  --accent-glow: rgba(217, 123, 63, 0.09);
  --surface: #f7f5f1;
  --card: #ffffff;
  --ink: #17161a;
  --text: #1d1d1f;
  --text-2: #4a4744;
  --muted: #64625e;
  --line: #e6e2db;
  --line-strong: #d6cec2;
  --primary: #a44f1b;           /* terracotta, darkened for readable links */
  --primary-hover: #853f17;
  --primary-soft: #fbefe6;
  --primary-line: #ecc9b0;
  --on-primary: #ffffff;
  --green: #8c5a14;             /* warm amber: roles and dates */
  --green-dot: #d97b3f;
  --green-soft: #f8eedc;
  --green-ink: #7a4d10;
  --count-active-bg: rgba(0, 0, 0, 0.2);
  --callout-bg: #fcf3ec;
  --callout-bg-2: #fffaf6;
  --callout-line: #ebcfb8;
  --nav-bg: rgba(248, 246, 243, 0.86);
  --nav-line: rgba(23, 22, 26, 0.07);
  --hover-bg: rgba(23, 22, 26, 0.05);
  --ring: #ffffff;
  --selection: rgba(217, 123, 63, 0.22);

  --shadow-xs: 0 1px 2px rgba(20, 18, 14, 0.05);
  --shadow-sm: 0 1px 3px rgba(20, 18, 14, 0.07), 0 1px 2px rgba(20, 18, 14, 0.04);
  --shadow-md: 0 14px 30px -16px rgba(20, 18, 14, 0.2), 0 3px 6px -3px rgba(20, 18, 14, 0.06);
  --shadow-avatar: 0 14px 34px rgba(20, 18, 14, 0.16), 0 3px 8px rgba(20, 18, 14, 0.08);

  /* Research-interest accents: terracotta and amber */
  --violet: #9a4518;
  --violet-accent: #d97b3f;
  --violet-bg: #fdf6f0;
  --violet-line: #f1dccb;
  --teal: #7a4f10;
  --teal-accent: #c39545;
  --teal-bg: #fbf7ee;
  --teal-line: #ece0c6;
  --rung-1-num: #a44f1b;
  --rung-2-num: #8c5a14;
  --rung-num-ink: #ffffff;

  /* Organization initials tiles */
  --org-cu-bg: #fbe8dc;   --org-cu-fg: #9a3f15;
  --org-pku-bg: #f1eae0;  --org-pku-fg: #5c4431;
  --org-gt-bg: #f8eed8;   --org-gt-fg: #714e0f;
  --org-bg: #f1ede7;      --org-fg: #3d3a36;

  /* Venue tiles (stand-ins for paper teasers) and the 404 numerals */
  --tile-default: linear-gradient(135deg, #3b332c 0%, #5a4e44 55%, #7b6d60 100%);
  --tile-dac: linear-gradient(135deg, #8a3c15 0%, #b35826 50%, #d6844d 100%);
  --tile-asplos: linear-gradient(135deg, #3a2a1f 0%, #664630 55%, #94693f 100%);
  --nf-gradient: linear-gradient(135deg, #a44f1b 15%, #d97b3f 55%, #e2a463 100%);

  /* Lift bars */
  --bar-track: #ece6dd;
  --bar-fill: linear-gradient(90deg, #e8a06a, #c4652e);
  --bar-total: linear-gradient(90deg, #d0a457, #8c5a14);

  --radius: 12px;
  --radius-sm: 8px;
  --container: 1100px;
  --gutter: 24px;
  --side: 320px;
  --col-gap: 56px;
  --nav-h: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #12110f;
  --bg-top: #12110f;
  --bg-bottom: #1a1714;
  --accent: #e8935a;
  --accent-glow: rgba(232, 147, 90, 0.06);
  --surface: #1b1a17;
  --card: #1b1a17;
  --ink: #f3efe9;
  --text: #ece7e0;
  --text-2: #cfc8bf;
  --muted: #a8a29a;
  --line: #302c27;
  --line-strong: #433c35;
  --primary: #f0a46e;
  --primary-hover: #f6c096;
  --primary-soft: rgba(232, 147, 90, 0.12);
  --primary-line: rgba(232, 147, 90, 0.34);
  --on-primary: #17161a;
  --green: #e6b877;
  --green-dot: #e8935a;
  --green-soft: rgba(230, 184, 119, 0.12);
  --green-ink: #e6b877;
  --count-active-bg: rgba(0, 0, 0, 0.28);
  --callout-bg: rgba(232, 147, 90, 0.09);
  --callout-bg-2: rgba(232, 147, 90, 0.04);
  --callout-line: rgba(232, 147, 90, 0.28);
  --nav-bg: rgba(18, 17, 15, 0.82);
  --nav-line: rgba(255, 255, 255, 0.07);
  --hover-bg: rgba(255, 255, 255, 0.07);
  --ring: #2b2723;
  --selection: rgba(232, 147, 90, 0.3);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 30px -14px rgba(0, 0, 0, 0.7), 0 3px 8px -3px rgba(0, 0, 0, 0.4);
  --shadow-avatar: 0 14px 34px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.4);
  --violet: #f3b58a;
  --violet-accent: #e8935a;
  --violet-bg: rgba(232, 147, 90, 0.07);
  --violet-line: rgba(232, 147, 90, 0.22);
  --teal: #ecc98a;
  --teal-accent: #cfa25a;
  --teal-bg: rgba(207, 162, 90, 0.06);
  --teal-line: rgba(207, 162, 90, 0.2);
  --rung-1-num: #e8935a;
  --rung-2-num: #cfa25a;
  --rung-num-ink: #17161a;
  --org-cu-bg: rgba(232, 147, 90, 0.16);  --org-cu-fg: #f3b58a;
  --org-pku-bg: rgba(214, 190, 160, 0.13); --org-pku-fg: #e8d6bd;
  --org-gt-bg: rgba(226, 184, 111, 0.14);  --org-gt-fg: #ecc98a;
  --org-bg: rgba(255, 255, 255, 0.08);     --org-fg: #ece7e0;
  --nf-gradient: linear-gradient(135deg, #f0a46e 15%, #e8935a 55%, #ecc98a 100%);
  --bar-track: #2b2723;
  --bar-fill: linear-gradient(90deg, #b8622c, #e8935a);
  --bar-total: linear-gradient(90deg, #8c5a14, #e6b877);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #12110f;
    --bg-top: #12110f;
    --bg-bottom: #1a1714;
    --accent: #e8935a;
    --accent-glow: rgba(232, 147, 90, 0.06);
    --surface: #1b1a17;
    --card: #1b1a17;
    --ink: #f3efe9;
    --text: #ece7e0;
    --text-2: #cfc8bf;
    --muted: #a8a29a;
    --line: #302c27;
    --line-strong: #433c35;
    --primary: #f0a46e;
    --primary-hover: #f6c096;
    --primary-soft: rgba(232, 147, 90, 0.12);
    --primary-line: rgba(232, 147, 90, 0.34);
    --on-primary: #17161a;
    --green: #e6b877;
    --green-dot: #e8935a;
    --green-soft: rgba(230, 184, 119, 0.12);
    --green-ink: #e6b877;
    --count-active-bg: rgba(0, 0, 0, 0.28);
    --callout-bg: rgba(232, 147, 90, 0.09);
    --callout-bg-2: rgba(232, 147, 90, 0.04);
    --callout-line: rgba(232, 147, 90, 0.28);
    --nav-bg: rgba(18, 17, 15, 0.82);
    --nav-line: rgba(255, 255, 255, 0.07);
    --hover-bg: rgba(255, 255, 255, 0.07);
    --ring: #2b2723;
    --selection: rgba(232, 147, 90, 0.3);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 14px 30px -14px rgba(0, 0, 0, 0.7), 0 3px 8px -3px rgba(0, 0, 0, 0.4);
    --shadow-avatar: 0 14px 34px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.4);
    --violet: #f3b58a;
    --violet-accent: #e8935a;
    --violet-bg: rgba(232, 147, 90, 0.07);
    --violet-line: rgba(232, 147, 90, 0.22);
    --teal: #ecc98a;
    --teal-accent: #cfa25a;
    --teal-bg: rgba(207, 162, 90, 0.06);
    --teal-line: rgba(207, 162, 90, 0.2);
    --rung-1-num: #e8935a;
    --rung-2-num: #cfa25a;
    --rung-num-ink: #17161a;
    --org-cu-bg: rgba(232, 147, 90, 0.16);  --org-cu-fg: #f3b58a;
    --org-pku-bg: rgba(214, 190, 160, 0.13); --org-pku-fg: #e8d6bd;
    --org-gt-bg: rgba(226, 184, 111, 0.14);  --org-gt-fg: #ecc98a;
    --org-bg: rgba(255, 255, 255, 0.08);     --org-fg: #ece7e0;
    --nf-gradient: linear-gradient(135deg, #f0a46e 15%, #e8935a 55%, #ecc98a 100%);
    --bar-track: #2b2723;
    --bar-fill: linear-gradient(90deg, #b8622c, #e8935a);
    --bar-total: linear-gradient(90deg, #8c5a14, #e6b877);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Warm paper: soft vertical gradient fixed to the viewport, faint terracotta glow at the top. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(56rem 26rem at 50% -9rem, var(--accent-glow), transparent 72%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 42%, var(--bg-bottom) 100%);
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
b, strong { font-weight: 600; }
button { font: inherit; }
::selection { background: var(--selection); color: inherit; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--primary); color: var(--on-primary);
  font-weight: 600; font-size: 14px; text-decoration: none;
  box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 12px; color: var(--on-primary); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(880px + 2 * var(--gutter)); }

.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }
.when-dark { display: none !important; }
[data-theme="dark"] .when-dark { display: block !important; }
[data-theme="dark"] .when-light { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 7px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn .icon { width: 15px; height: 15px; }
.btn:hover { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn-ghost { background: transparent; box-shadow: none; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--nav-line);
  box-shadow: 0 1px 3px rgba(20, 18, 14, 0.04);
}
.nav {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  max-width: 1440px; height: var(--nav-h); margin: 0 auto; padding: 0 28px;
}
.nav-brand {
  justify-self: start;
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.nav-brand:hover { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  display: block; padding: 8px 15px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: var(--primary); background: var(--hover-bg); }
.nav-links a.is-active,
.nav-links a.is-current,
.nav-links a[aria-current="page"] { color: var(--primary); }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.theme-toggle, .nav-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--text);
  cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.theme-toggle:hover, .nav-toggle:hover { background: var(--hover-bg); color: var(--primary); }
.theme-toggle .icon, .nav-toggle .icon { width: 19px; height: 19px; }
.nav-toggle { display: none; }
.nav-toggle .when-open { display: none; }
.menu-open .nav-toggle .when-open { display: block; }
.menu-open .nav-toggle .when-closed { display: none; }
.nav-cv {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card);
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.nav-cv:hover { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }

/* ---------- Hero / profile card ---------- */
.hero {
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: var(--col-gap);
  align-items: start; padding-top: 40px; padding-bottom: 56px;
}
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar {
  width: 156px; height: 156px; border-radius: 50%; overflow: hidden; flex: none;
  border: 5px solid var(--ring); background: var(--ring);
  box-shadow: var(--shadow-avatar);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name {
  margin-top: 20px;
  font-size: 24px; font-weight: 800; letter-spacing: -0.022em; line-height: 1.25;
}
.profile-loc {
  display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 0;
  font-size: 13.5px; color: var(--muted);
}
.profile-loc .icon { width: 14px; height: 14px; }
.profile-roles { display: grid; gap: 16px; margin-top: 18px; }
.profile-roles li { display: flex; flex-direction: column; gap: 1px; }
.role-title { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--green); }
.role-title--main { text-transform: capitalize; }
.role-org { font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--muted); text-wrap: balance; }
.role-org a { color: inherit; text-decoration: none; }
.role-org a:hover { color: var(--primary); text-decoration: underline; }

.profile-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.profile-links a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  box-shadow: var(--shadow-sm); text-decoration: none;
  transition: color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.profile-links a:hover {
  color: var(--primary); border-color: var(--primary-line);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.profile-links .icon { width: 16px; height: 16px; }
.profile-links .icon-img { border-radius: 4px; }
.social-text { font-size: 11px; font-weight: 800; letter-spacing: 0.02em; line-height: 1; }

.callout {
  display: flex; gap: 11px; width: 100%; margin-top: 28px; padding: 15px 18px;
  text-align: left;
  border: 1px solid var(--callout-line); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--callout-bg) 0%, var(--callout-bg-2) 100%);
}
.callout p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.callout strong { color: var(--primary); font-weight: 700; }
.status-dot {
  position: relative; flex: none; width: 9px; height: 9px; margin-top: 6.5px;
  border-radius: 50%; background: var(--green-dot);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--green-dot); opacity: .5;
  animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

.hero-main { min-width: 0; }
.bio { font-size: 15.5px; line-height: 1.75; color: var(--text); }
.bio p { margin: 0 0 14px; }
.bio p:last-child { margin-bottom: 0; }
.bio a {
  color: var(--ink); font-weight: 700; text-decoration: underline;
  text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.bio a:hover { color: var(--primary); text-decoration-color: currentColor; }
.bio strong { color: var(--ink); font-weight: 700; }

.nowrap { white-space: nowrap; }

/* Recent papers strip (under the bio) */
.paper-strip { margin-top: 30px; }
.strip-label {
  margin: 0 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.strip-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.strip-item {
  display: flex; align-items: center; gap: 12px; height: 100%;
  padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); text-decoration: none; box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.strip-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.strip-text { display: flex; flex-direction: column; min-width: 0; }
.strip-title { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ink); transition: color .15s ease; }
.strip-item:hover .strip-title { color: var(--primary); }
.strip-sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); }

/* Affiliation timeline (under the bio) */
.journey { display: flex; margin-top: 32px; padding: 0 8px 4px; }
.journey-step {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 10px;
}
.journey-step:not(:last-child)::after {
  content: ""; position: absolute; z-index: 0; top: 29px; left: 50%; width: 100%; height: 2px;
  background: var(--ink); opacity: .85;
}
.journey-step.is-now::before,
.journey-step:first-child:not(.is-now)::before {
  content: ""; position: absolute; z-index: 0; top: 29px; left: 50%; width: 40%; height: 2px;
  background: linear-gradient(90deg, var(--ink), transparent); opacity: .85;
}
.journey-step:first-child:not(.is-now)::before { left: 10%; background: linear-gradient(90deg, transparent, var(--ink)); }
.journey-node {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.journey-node .org-logo { width: 46px; height: 46px; border-radius: 50%; font-size: 13px; }
.journey-year {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.journey-now {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; color: var(--green); background: var(--green-soft);
}
.journey-org { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.journey-role { margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.45; max-width: 210px; }

/* Organization initials tile */
.org-logo {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 10px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; line-height: 1;
  background: var(--org-bg); color: var(--org-fg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.org-cornell-university { background: var(--org-cu-bg); color: var(--org-cu-fg); }
.org-peking-university { background: var(--org-pku-bg); color: var(--org-pku-fg); }
.org-georgia-institute-of-technology { background: var(--org-gt-bg); color: var(--org-gt-fg); }

/* ---------- Two-column home grid ---------- */
.home-grid {
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: var(--col-gap);
  align-items: start; padding-top: 24px; padding-bottom: 88px;
}
.home-side, .home-main { min-width: 0; }
.block + .block { margin-top: 64px; }
.block-title {
  margin-bottom: 26px;
  font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; color: var(--ink);
}
.block-intro { margin: -12px 0 22px; font-size: 14.5px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.eq-note { color: var(--text-2); white-space: nowrap; }
.eq-note b { color: var(--ink); }
.sub-title {
  margin: 40px 0 16px;
  font-size: 21px; font-weight: 800; letter-spacing: -0.02em;
}

/* Experience / education */
.xp-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.xp-item:first-child { padding-top: 4px; }
.xp-role { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.xp-org { margin: 3px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.xp-org a { color: inherit; text-decoration: none; }
.xp-org a:hover { color: var(--primary); text-decoration: underline; }
.xp-meta { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.xp-detail { margin: 5px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.xp-detail a { color: var(--text-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); }
.xp-detail a:hover { color: var(--primary); text-decoration-color: currentColor; }

/* News */
.news-item {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.news > .news-item:first-child { padding-top: 2px; }
.news-date {
  font-size: 13.5px; font-weight: 700; line-height: 1.65; color: var(--green);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.news-text { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--text); }
.news-text strong { color: var(--ink); font-weight: 600; }
.news-text a { color: var(--primary); font-weight: 500; text-decoration: none; }
.news-text a:hover { color: var(--primary-hover); text-decoration: underline; }
.news-more > summary {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 14px; font-weight: 600; color: var(--primary); cursor: pointer; list-style: none;
  border-radius: 6px;
}
.news-more > summary::-webkit-details-marker { display: none; }
.news-more > summary:hover { color: var(--primary-hover); }
.news-more > summary .icon { width: 16px; height: 16px; transition: transform .2s ease; }
.news-more[open] > summary .icon { transform: rotate(180deg); }
.news-more .when-open { display: none; }
.news-more[open] .when-open { display: inline; }
.news-more[open] .when-closed { display: none; }
.news-more[open] > summary { margin-bottom: 4px; }

/* Skills */
.skills { display: grid; gap: 16px; }
.skills dt { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.skill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-list li {
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 13px; font-weight: 500; color: var(--text);
}

/* Research interests ladder */
.ladder { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; }
.ladder-rail { position: relative; display: flex; justify-content: center; align-items: center; }
.ladder-rail::before {
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 3px; margin-left: -1.5px;
  border-radius: 3px; background: linear-gradient(180deg, var(--violet-accent), var(--teal-accent));
}
.rail-label {
  position: relative; padding: 10px 0;
  writing-mode: vertical-rl; transform: rotate(180deg);
  background: var(--bg); color: var(--text-2);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
}
.rungs { display: grid; gap: 12px; }
.rung {
  --rung-bg: var(--violet-bg); --rung-line: var(--violet-line); --rung-accent: var(--violet-accent); --rung-ink: var(--violet);
  padding: 15px 18px 16px 16px;
  border: 1px solid var(--rung-line); border-left: 3px solid var(--rung-accent); border-radius: 10px;
  background: var(--rung-bg);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rung-2 { --rung-bg: var(--teal-bg); --rung-line: var(--teal-line); --rung-accent: var(--teal-accent); --rung-ink: var(--teal); }
.rung:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rung-head { display: flex; align-items: flex-start; gap: 10px; }
.rung-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.rung-num {
  display: grid; place-items: center; flex: none; width: 21px; height: 21px; margin-top: 1.5px; border-radius: 50%;
  background: var(--rung-accent); color: var(--rung-num-ink); font-size: 11.5px; font-weight: 800;
}
.rung-1 .rung-num { background: var(--rung-1-num); }
.rung-2 .rung-num { background: var(--rung-2-num); }
.rung-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.rung-label {
  padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--rung-line); background: var(--card);
  font-size: 12px; font-weight: 600; font-style: italic; color: var(--rung-ink);
}
.rung-body { padding-left: 31px; }
.rung-text { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.rung-tags { display: flex; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.rung-tags li:not(:last-child)::after { content: "·"; margin: 0 7px; color: var(--line-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--card);
  font-size: 13px; font-weight: 500; color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.chip:hover { color: var(--primary); border-color: var(--primary-line); transform: translateY(-1px); }
.chip-venue { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }

/* Hands-on experience */
.handson { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.handson-card {
  display: flex; gap: 13px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.handson-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.handson-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
}
.handson-icon .icon { width: 18px; height: 18px; }
.handson-title { margin: 1px 0 3px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.handson-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* ---------- Publications ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px 5px 13px;
  border: 1px solid var(--primary-line); border-radius: 999px; background: var(--primary-soft);
  color: var(--primary); font-size: 13px; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.filter:hover { border-color: var(--primary); }
.filter[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filter-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; text-align: center;
  background: var(--card); color: var(--primary); font-size: 11.5px; font-weight: 700; line-height: 18px;
}
.filter[aria-pressed="true"] .filter-count { background: var(--count-active-bg); color: inherit; }

.pub-list { border-top: 1px solid var(--line); padding-top: 14px; }
.pub-year + .pub-year { margin-top: 22px; }
.pub-year-title {
  margin: 0 0 10px 2px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.01em; color: var(--muted);
}
.pub-year:not(:has(.pub:not([hidden]))) { display: none; }
.pub {
  display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; align-items: center;
  padding: 11px 16px 11px 11px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.pub:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pub[hidden] { display: none; }
.pub-thumb { display: block; align-self: start; border-radius: 8px; text-decoration: none; }
.pub-thumb img { width: 130px; height: 90px; object-fit: cover; border-radius: 8px; }
.pub-body { min-width: 0; }
.pub-title { font-size: 16px; font-weight: 600; line-height: 1.42; letter-spacing: -0.005em; text-wrap: pretty; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--primary); }
.pub-authors { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.pub-authors .me {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.eq { margin-left: 1px; color: var(--muted); font-size: 0.75em; }
.pub-tldr { margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.pub-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 5px; font-size: 13px; line-height: 1.6; }
.pub-venue { color: var(--muted); margin-right: 2px; }
.pub-venue-name { color: var(--text-2); font-weight: 600; }
.pub-link {
  color: var(--primary); font-weight: 500; text-decoration: none; cursor: pointer; border-radius: 4px;
}
.pub-link:hover { color: var(--primary-hover); text-decoration: underline; }
.cite { display: contents; }
.cite > summary { list-style: none; }
.cite > summary::-webkit-details-marker { display: none; }
.cite[open] > summary { text-decoration: underline; }

.cite-box {
  display: flex; align-items: flex-start; gap: 12px; flex-basis: 100%;
  margin-top: 8px; padding: 12px 12px 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 13px; line-height: 1.6; color: var(--text-2);
}
.cite-box p { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.cite-copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.cite-copy .icon { width: 13px; height: 13px; }
.cite-copy:hover { color: var(--primary); border-color: var(--primary-line); }
.cite-copy.is-done { color: var(--green); border-color: currentColor; }

/* Venue tile (stands in for a teaser figure) */
.venue-tile {
  --tile: var(--tile-default);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  width: 130px; height: 90px; padding: 10px 12px; border-radius: 8px;
  background: var(--tile); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.venue-tile::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0) 46%),
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px) 0 0 / 10px 10px;
}
.venue-tile::after {
  content: ""; position: absolute; z-index: -1; right: -18px; bottom: -26px;
  width: 74px; height: 74px; border-radius: 50%;
  border: 12px solid rgba(255, 255, 255, 0.1);
}
.venue-dac { --tile: var(--tile-dac); }
.venue-asplos { --tile: var(--tile-asplos); }
.vt-venue { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.vt-title {
  align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.18);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
}
.venue-tile--sm { flex: none; width: 66px; height: 48px; padding: 6px 8px; border-radius: 8px; justify-content: flex-end; }
.venue-tile--sm .vt-venue { font-size: 12px; letter-spacing: 0.01em; }
.vt-year { font-size: 10.5px; font-weight: 700; line-height: 1.2; opacity: .85; }
.venue-tile--sm::after { width: 40px; height: 40px; right: -12px; bottom: -18px; border-width: 7px; }
.venue-tile--lg { width: 100%; height: auto; aspect-ratio: 13 / 10; padding: 16px; border-radius: 12px; }
.venue-tile--lg .vt-venue { font-size: 28px; }
.venue-tile--lg .vt-title { font-size: 12px; padding: 3px 10px; }
.venue-tile--lg::after { width: 120px; height: 120px; right: -30px; bottom: -42px; border-width: 18px; }

.more-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }

/* ---------- Inner pages ---------- */
.page { padding-top: 56px; padding-bottom: 88px; }
.page-head { margin-bottom: 36px; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary);
}
.page-title { font-size: 44px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.lead { margin: 14px 0 0; max-width: 62ch; font-size: 17px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.page--pubs .pub-list { border-top: 0; padding-top: 6px; }
.page--pubs .pub-year-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 14px; }
.page--pubs .pub-year + .pub-year { margin-top: 36px; }

.prose { font-size: 16px; line-height: 1.75; color: var(--text); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-color: var(--primary-line); }
.prose a:hover { text-decoration-color: currentColor; }
.prose sup, .prose sub { line-height: 0; }

/* Paper detail */
.paper { padding-top: 32px; padding-bottom: 88px; }
.back { margin: 0 0 18px; }
.back a {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 0;
  font-size: 14px; font-weight: 600; color: var(--text-2); text-decoration: none;
}
.back a:hover { color: var(--primary); }
.back .icon { width: 15px; height: 15px; transition: transform .15s ease; }
.back a:hover .icon { transform: translateX(-3px); }
.paper-card {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start;
  padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow-sm);
}
.paper-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.badge .icon { width: 13px; height: 13px; }
.badge--venue { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); }
.paper-title { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.22; }
.paper-authors { margin-top: 12px; font-size: 15px; }
.paper-card .eq-note { display: block; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.paper-teaser { margin: 24px 0 0; }
.paper-teaser img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.paper-section {
  margin-top: 20px; padding: 24px 26px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
.paper-section h2 { margin-bottom: 12px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.paper-section .prose { font-size: 15.5px; }
.paper-section .cite-box { margin-top: 0; font-size: 14px; }
.paper-more { margin-top: 36px; }
.paper-more .strip-label {
  margin-bottom: 14px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; text-transform: none; color: var(--ink);
}
.paper-interest {
  display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.paper-interest .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--primary); }
.paper-interest a { font-weight: 600; color: var(--primary); text-decoration: none; }
.paper-interest a:hover { text-decoration: underline; }

/* Fun Side */
.jump ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jump a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.jump a:hover { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.jump .icon { width: 14px; height: 14px; color: var(--primary); }
.fun-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fun-card {
  padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.fun-card:not(.fun-card--wide):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.fun-card--wide { grid-column: 1 / -1; }
.fun-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fun-icon {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px;
  background: var(--primary-soft); color: var(--primary);
}
.fun-icon .icon { width: 20px; height: 20px; }
.fun-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.fun-text { font-size: 15px; line-height: 1.7; color: var(--text); }
.fun-text p { margin: 0 0 10px; }
.fun-text p:last-child { margin-bottom: 0; }
.fun-card--wide .fun-text { max-width: 72ch; }

.lifts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.lift {
  padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.lift p { margin: 0; }
.lift-name { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.lift-value { margin-top: 6px !important; font-size: 14px; font-weight: 600; color: var(--muted); }
.lift-value strong {
  font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.lift-bar { height: 8px; margin-top: 12px; border-radius: 999px; background: var(--bar-track); overflow: hidden; }
.lift-bar span { display: block; height: 100%; border-radius: inherit; background: var(--bar-fill); }
.lift-goal { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px !important; font-size: 12.5px; color: var(--muted); }
.lift-pct { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lift-total { border-color: var(--primary-line); background: var(--primary-soft); }
.lift-total .lift-name { color: var(--primary); }
.lift-total .lift-bar span { background: var(--bar-total); }
.lift-total .lift-pct { color: var(--green-ink); }
.lift-total .lift-goal { color: var(--text-2); }
.lift-note {
  display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0;
  padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2);
}
.lift-note .icon { width: 14px; height: 14px; color: var(--primary); }
.lift-note strong { color: var(--ink); }

/* 404 */
.notfound { display: grid; place-items: center; padding-top: 72px; padding-bottom: 96px; text-align: center; }
.nf-card { max-width: 560px; }
.nf-code {
  margin: 0 0 8px;
  font-size: clamp(88px, 18vw, 140px); font-weight: 800; letter-spacing: -0.06em; line-height: 1;
  background: var(--nf-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf-title { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.nf-text { margin-top: 12px; font-size: 16px; line-height: 1.7; color: var(--text-2); text-wrap: balance; }
.nf-text p { margin: 0; }
.nf-text a { font-weight: 600; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 0; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 30px 0 38px; border-top: 1px solid var(--line);
  text-align: center; font-size: 13px; color: var(--muted);
}
.footer-inner p { margin: 0; }
.footer-dot { margin: 0 2px; }
.footer-inner p + p { margin-top: 4px; }
.site-footer a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); }
.site-footer a:hover { color: var(--primary); text-decoration-color: currentColor; }

/* ---------- Motion ---------- */
.reveal-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  :root { --side: 296px; --col-gap: 40px; }
  .nav-links a { padding: 8px 11px; }
  .profile-links { gap: 6px; }
}

@media (max-width: 960px) {
  .nav { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px; padding: 0 16px 0 20px; }
  .nav-toggle { display: inline-grid; grid-column: 3; grid-row: 1; }
  .nav-actions { grid-column: 2; grid-row: 1; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 12px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px -12px rgba(20, 18, 14, 0.2);
  }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 16px; border-radius: 10px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 32px; padding-bottom: 40px; }
  .profile { max-width: 440px; width: 100%; margin-inline: auto; }
  .home-grid { display: flex; flex-direction: column; gap: 56px; padding-top: 8px; }
  .home-side, .home-main { display: contents; }
  .block + .block { margin-top: 0; }
  #news { order: 1; }
  #research { order: 2; }
  #publications { order: 3; }
  #background { order: 4; }
  #education { order: 5; }
  #skills { order: 6; }
  .fun-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .block-title { font-size: 30px; margin-bottom: 20px; }
  .page { padding-top: 36px; padding-bottom: 64px; }
  .page-title { font-size: 36px; }
  .lead { font-size: 16px; }
  .journey { padding-inline: 0; }
  .journey-step { padding: 0 4px; }
  .journey-role { display: none; }
  .journey-year { font-size: 20px; flex-direction: column; gap: 4px; }
  .journey-node { width: 52px; height: 52px; }
  .journey-node .org-logo { width: 40px; height: 40px; font-size: 12px; }
  .journey-step::after, .journey-step::before { top: 25px !important; }
  .handson { grid-template-columns: minmax(0, 1fr); }
  .ladder { gap: 8px; }
  .rung { padding: 14px 14px 15px 13px; }
  .rung-body { padding-left: 0; }
  .strip-list { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .strip-item { flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 6px 9px; }
  .strip-item .venue-tile--sm { width: 100%; height: 44px; }
  .strip-text { padding-inline: 4px; }
  .strip-title { font-size: 13.5px; }
  .strip-sub { font-size: 12px; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 11px; }
  .pub-thumb { align-self: stretch; }
  .pub-thumb .venue-tile { width: 100%; height: 64px; flex-direction: row; align-items: center; }
  .pub-thumb img { width: 100%; height: 120px; }
  .fun-grid { grid-template-columns: minmax(0, 1fr); }
  .fun-card { padding: 20px; }
  .paper-card { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 20px; }
  .paper-thumb .venue-tile--lg { aspect-ratio: auto; height: 104px; flex-direction: row; align-items: center; }
  .paper-title { font-size: 24px; }
  .paper-section { padding: 20px; }
  .cite-box { flex-direction: column; }
  .footer-dot { display: none; }
  .footer-inner p:first-child .nowrap { display: block; }
}

@media (max-width: 400px) {
  .nav-brand { font-size: 14px; }
  .lifts { gap: 10px; }
  .lift { padding: 14px 12px 12px; }
  .lift-value strong { font-size: 28px; }
}

@media print {
  .site-header, .site-footer, .skip-link, .filters, .more-links, .cite { display: none !important; }
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
}
