* { box-sizing: border-box; }
html, /* --- Prevent horizontal layout shift between pages --- */
/* Reserve scrollbar space on all pages so layout width stays constant */
html {
  scrollbar-gutter: stable; /* modern browsers */
}

/* Fallback for browsers that don't support scrollbar-gutter */
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; } /* always show vertical scrollbar */
}

/* Safety: avoid accidental horizontal overflow causing side scroll */
body { overflow-x: hidden; }
/* --- End: Prevent horizontal layout shift --- */

body { height: 100%;}
:root {
  --text: #111111;
  --muted: #666666;
  --border: #e6e6e6;
  --bg: #ffffff;
  --brand: #111111;
  --accent: #0a66c2;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px;}

/* Header (white background, thin border) */
.site-header {
  position: sticky; top: 0; z-index: 10; max-height: 60px; 
  background: #fff; border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0px 0; 
}
.brand { color: var(--brand); font-weight: 700; font-size: 50px; }
.nav { display: flex; gap: 1px; align-items: center; }
.nav a { color: var(--text); padding: 6px 8px; border-radius: 8px; font-size: 15px; font-weight: 700;}
.nav a.active { background: #f6f6f6; }
.nav .btn { border: 1px solid var(--border); padding: 6px 10px; border-radius: 999px; }
.nav .btn:hover { background: #f6f6f6; text-decoration: none; }

/* Layout */
.content { padding: 28px 0 40px; }

.hero {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px;
  /* align-items: start; */
  align-items: center;
}
.avatar { width: 300px; height: 300px; border-radius: 12px; background: #f2f2f2; border: 1px solid var(--border); }
.lab { width: auto; height: 200px; border-radius: 12px; background: #f2f2f2; align-items: center; }
.contact-row { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; margin-left: 80px; margin-top: 10px; }
.icon-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); border: 1px solid var(--border); background: #fff;
  padding: 6px 10px; border-radius: 999px;
}
.icon-link:hover { background: #f6f6f6; text-decoration: none; }

.hero-right h1 {margin: 0 0 6px; font-size: 30px; line-height: 1.2; }
.hero-right h2 {margin: 0 0 6px; font-size: 18px; line-height: 1.2; }
.hero-right p { margin: 8px 0; color: var(--text); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.card { margin-top: 26px;
  border: 1px solid var(--border); gap: 20px; border-radius: 12px; padding: 16px 18px; background: #fff;
}
.card h2 { margin: 0 0 6px; font-size: 28px; }
.clean-list { margin: 0; padding-left: 18px;}
.news-list { margin: 0; padding-left: 18px; }
.news-list .date { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }

/* Publications */
.page-title h1 { margin: 0 0 6px; font-size: 28px; }
.page-title h2 { margin: 0 0 6px; font-size: 14px; align-items: center;margin-top: 10px;}
.page-title p { margin: 6px 0 16px; color: var(--muted); }
.pubs { display: grid; gap: 18px; }
.pub {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: #fff;
}
.pub h2 { margin: 0 0 6px; font-size: 30px; }
.pub h3 { margin: 0 0 6px; font-size: 18px; }
.pub .authors, .pub .venue { margin: 4px 0; color: var(--muted); }
.links { display: flex; gap: 10px; margin-top: 8px; }
.btn-sm { border: 1px solid var(--border); padding: 6px 10px; border-radius: 999px; }
.btn-sm:hover { background: #f6f6f6; text-decoration: none; }

/* People */
.people { display: grid; gap: 14px; margin-top: 50px;}
.person { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; }
.avatar-sm { width: 56px; height: 56px; border-radius: 100%; background: #f2f2f2; border: 1px solid var(--border); }
.small { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 5px 0; background: #fff; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; }
}

/* --- Entry rows with left thumbnail aligned to card height --- */
.entry-row {
  display: grid;
  grid-template-columns: 240px 1fr; /* left image width + content */
  gap: 16px;
  align-items: stretch; /* make columns match height */
}

.entry-thumb {
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f2;
  border: 1px solid var(--border);
}

/* Ensure the image fills the full height to match the card */
.entry-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop without distortion */
}

/* Make the right card stretch to full row height */
.entry-row .pub {
  height: 100%;
}

/* Responsive tweak: stack on small screens */
@media (max-width: 600px) {
  .entry-row {
    grid-template-columns: 1fr;
  }
  .entry-thumb {
    height: 160px; /* fixed preview height on small screens */
  }
}
