/* ntducphd.github.io: one plain stylesheet (no Sass step), light and dark themes.
   Colours: red #c7222a is the identity mark, teal #0f6e5c the second colour and the link colour. */

/* ---- Font: Inter 4.1 (SIL Open Font License 1.1), subset to Latin and Vietnamese; one variable file
   per style covers every weight. See assets/fonts/OFL.txt and FONTLOG.txt. ---- */
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-roman.woff2") format("woff2"); }
@font-face { font-family: "Inter Variable"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-italic.woff2") format("woff2"); }

/* ---- Tokens ---- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9f9;
  --ink: #0f1419;
  --ink-2: #3a4650;
  --muted: #536471;
  --border: #e3e9ed;
  --accent: #c7222a;
  --accent-ink: #a91d24;
  --accent-soft: #fdeff0;
  --teal: #0f6e5c;
  --teal-soft: #e6f4f0;
  --link: #0f6e5c;
  --header-bg: rgba(255, 255, 255, 0.85);
  --shadow: none;
  --radius: 16px;
  --font-serif: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-sans: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --maxw: 1152px;
  --textw: 46rem;
  --header-h: 64px;
  --brand-mark: #000;
  /* fixed brand colours, the same in both themes */
  --brand-red: #c7222a; --brand-red-dark: #a91d24; --brand-teal: #0f6e5c; --brand-teal-dark: #0b5446;
  /* status colours: pending (amber), journal rank and other categories (blue) */
  --amber-soft: #fff1d6; --amber-ink: #7a4f00; --amber-line: #f1d7a8;
  --blue-soft: #e8ecf7; --blue-ink: #34508f;
  /* type scale, in rem so the reader's own font size and zoom apply; nine sizes for the whole site */
  --fs-xs: 0.8125rem;   /* 13px  labels, badges */
  --fs-sm: 0.9375rem;   /* 15px  interface, metadata, notes */
  --fs-md: 1.0625rem;   /* 17px  card and list text */
  --fs-base: 1.0625rem; /* 17px  running text */
  --fs-lg: 1.25rem;     /* 20px  subtitles, h3 */
  --fs-xl: 1.5rem;      /* 24px  card titles, list headings */
  --fs-2xl: 1.75rem;    /* 28px  section headings, figures */
  --fs-lead: clamp(1.25rem, 2.2vw, 1.5rem);        /* lead sentences */
  --fs-title: clamp(1.875rem, 4.2vw, 2.625rem);    /* page titles */
  --fs-hero: clamp(2rem, 4.2vw, 3rem);            /* the name on the home page */
  --label-spacing: 0.1em;  /* every small uppercase label */
  color-scheme: light;
}
/* the dark palette, applied when the reader chose dark, or when the system is dark and they chose nothing */
:root[data-theme="dark"] {
  --bg: #000000; --surface: #16181c; --surface-2: #1c1f23; --ink: #e7e9ea; --ink-2: #c8cdd1; --muted: #8b949b;
  --border: #2f3336; --accent: #ef5b61; --accent-ink: #ff8388; --accent-soft: #2a1618;
  --teal-soft: #14302a; --link: #5fcfb4; --header-bg: rgba(0, 0, 0, 0.82); --brand-mark: #fff;
  --shadow: none; color-scheme: dark;
  --teal: #5fcfb4; --amber-soft: #3a2c14; --amber-ink: #ffcf8a; --amber-line: transparent; --blue-soft: #1e2740; --blue-ink: #a9bcf0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #16181c; --surface-2: #1c1f23; --ink: #e7e9ea; --ink-2: #c8cdd1; --muted: #8b949b;
    --border: #2f3336; --accent: #ef5b61; --accent-ink: #ff8388; --accent-soft: #2a1618;
    --teal-soft: #14302a; --link: #5fcfb4; --header-bg: rgba(0, 0, 0, 0.82); --brand-mark: #fff;
    --shadow: none; color-scheme: dark;
  --teal: #5fcfb4; --amber-soft: #3a2c14; --amber-ink: #ffcf8a; --amber-line: transparent; --blue-soft: #1e2740; --blue-ink: #a9bcf0;
  }
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-serif); font-size: var(--fs-base);
  line-height: 1.6; font-kerning: normal; overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 750; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
strong, b { font-weight: 700; }
::selection { background: var(--brand-teal); color: #fff; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
/* brand marks keep their owners' colours: the GitHub mark only in black or white, the ORCID iD in its own green */
svg.icon--github, a:hover svg.icon--github { color: var(--brand-mark) !important; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--surface);
  color: var(--ink); border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-sans); }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
.eyebrow { margin: 0 0 0.5rem; font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: var(--label-spacing); text-transform: uppercase; color: var(--accent-ink); }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--header-bg); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.site-header::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand__mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-teal-dark)); color: #fff; font-family: var(--font-sans);
  font-size: var(--fs-sm); font-weight: 800; letter-spacing: 0.02em; }
.brand__name { font-family: var(--font-sans); font-size: var(--fs-base); font-weight: 800; letter-spacing: -0.01em; }
.site-nav__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav__list a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none;
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; }
.site-nav__list a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav__list a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 8px 8px 0 0; }
.site-header__tools { display: flex; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); cursor: pointer; font-size: var(--fs-lg); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: inline; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}
.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; }
  .site-nav__list { display: none; flex-direction: column; gap: 0; padding: 8px 12px 16px; background: var(--surface);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .site-nav__list.is-open { display: flex; }
  .site-nav__list a { padding: 12px; font-size: var(--fs-md); }
  .site-nav__list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 8px 8px 0; }
}

/* ---- Page frame ---- */
.page-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 44px 0 34px; }
.page-header__title { margin: 0; font-size: var(--fs-title); letter-spacing: -0.02em; }
.page-header__title--paper { font-size: var(--fs-2xl); max-width: 52rem; }
.page-header__subtitle { margin: 12px 0 0; max-width: 44rem; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-lg); line-height: 1.5; }
.page-body { padding-top: 40px; padding-bottom: 80px; }
.page-body--with-nav { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.page-content { max-width: var(--textw); min-width: 0; }
.page-content--wide { max-width: none; }

/* ---- Section sub-menu ---- */
.section-nav { position: sticky; top: calc(var(--header-h) + 24px); font-family: var(--font-sans); }
.section-nav__list { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--border); }
.section-nav__list a { display: block; margin-left: -1px; padding: 8px 14px; border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.section-nav__list a:hover { color: var(--ink); }
.section-nav__list a[aria-current="page"] { color: var(--ink); border-left-color: var(--accent); background: var(--accent-soft); }
.section-nav__details { display: none; }
@media (max-width: 860px) {
  .page-body--with-nav { display: block; }
  .section-nav { position: static; margin-bottom: 28px; }
  .section-nav__list { display: none; }
  .section-nav__details { display: block; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .section-nav__details summary { padding: 12px 16px; cursor: pointer; font-weight: 700; }
  .section-nav__details ul { margin: 0; padding: 0 8px 10px; list-style: none; }
  .section-nav__details a { display: block; padding: 8px; color: var(--ink-2); text-decoration: none; }
  .section-nav__details a[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
}

/* ---- Running text ---- */
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose dl, .prose blockquote, .prose table { margin: 0 0 1.1em; }
.prose h2 { margin: 2.2em 0 0.7em; font-size: var(--fs-2xl); }
.prose h3 { margin: 1.8em 0 0.5em; font-size: var(--fs-lg); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose blockquote { margin-left: 0; padding-left: 1em; border-left: 3px solid var(--border); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: var(--fs-sm); }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose h2 + hr { display: none; }
.prose iframe { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius); }
.align-right { float: right; max-width: 40%; margin: 0.3em 0 1em 1.5em; border-radius: var(--radius); }
.align-left { float: left; max-width: 40%; margin: 0.3em 1.5em 1em 0; border-radius: var(--radius); }
@media (max-width: 640px) { .align-right, .align-left { float: none; display: block; max-width: 100%; margin: 0 0 1em; } }

/* ---- Buttons and pills ---- */
.btn, .pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-weight: 600;
  text-decoration: none; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 999px; }
.btn { padding: 9px 18px; font-size: var(--fs-sm); margin: 0 8px 8px 0; }
.btn:hover, a.pill:hover { border-color: var(--accent); color: var(--accent-ink); }
/* the brand red in both themes: the dark theme's lighter accent is too pale behind white text */
.btn--primary { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.btn--primary:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); color: #fff; }
.pill { padding: 3px 11px; font-size: var(--fs-xs); }
.pill--link { color: var(--link); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link { margin-top: 2em; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; }
.back-link a { text-decoration: none; }

/* ---- Publications ---- */
.prose .pub-list { margin: 0 0 2em; padding: 0; list-style: none; }
.prose .pub-item { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); line-height: 1.55; }
.pub-item:last-child { border-bottom: 0; }
.prose .pub-group { display: flex; align-items: baseline; gap: 10px; margin: 2em 0 0.3em; padding-bottom: 8px;
  border-bottom: 2px solid var(--ink); font-size: var(--fs-xl); scroll-margin-top: calc(var(--header-h) + 16px); }
.pub-group__n { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.pub-item__cite { margin-bottom: 8px; }
.pub-pills { gap: 6px; }
.pub-pills .pill { padding: 1px 10px; font-size: var(--fs-xs); }
.pill--review { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber-ink); }
.pill--accepted { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.jump-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.5em; font-family: var(--font-sans); }
.jump-nav a { padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.jump-nav a:hover { border-color: var(--accent); color: var(--accent-ink); }
.metrics { margin: 0 0 1.4em; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.metrics__row { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.prose .metric { display: flex; flex-direction: column; margin: 0; font-family: var(--font-sans); }
.metric__n { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; color: var(--ink); }
.metric__l { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--label-spacing); text-transform: uppercase; }
.prose .metrics__note { margin: 12px 0 0; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.5; }
.paper-citation { margin-top: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--fs-md); }
.prose .paper-authors { margin: 0 0 6px; color: var(--ink-2); }
.prose .paper-venue { margin: 0 0 14px; color: var(--ink-2); }
.paper-label { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.paper-cite { margin: 18px 0 0; }
.paper-cite summary { cursor: pointer; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--link); }
.paper-note { color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }

/* ---- Entries: talks, teaching, posts ---- */
.entry { padding: 22px 0; border-bottom: 1px solid var(--border); }
.entry:first-child { padding-top: 0; }
.entry__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 6px; color: var(--muted);
  font-family: var(--font-sans); font-size: var(--fs-sm); }
.entry__meta .eyebrow { margin: 0; }
.prose .entry__title { margin: 0 0 6px; font-size: var(--fs-lg); }
.entry__title a { color: var(--ink); text-decoration: none; }
.entry__title a:hover { color: var(--accent-ink); }
.prose .entry__venue { margin: 0 0 8px; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }
.entry__excerpt p { margin: 0; font-size: var(--fs-md); }
.meta-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 1.4em !important; padding: 0 !important; list-style: none;
  color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }
.meta-list li { display: inline-flex; gap: 7px; align-items: baseline; margin: 0; }
.meta-list .icon { color: var(--teal); }

/* ---- Awards ---- */
.prose .award-list { margin: 0; padding: 0; list-style: none; }
.award { padding: 18px 0; border-bottom: 1px solid var(--border); }
.award:first-child { padding-top: 0; }
.award:last-child { border-bottom: 0; }
.prose .award__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 4px;
  font-family: var(--font-sans); }
.award__year { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.prose .award__title { margin: 0 0 4px; font-size: var(--fs-md); line-height: 1.35; }
.prose .award__detail { margin: 0 0 4px; color: var(--ink-2); font-size: var(--fs-sm); }
.prose .award__source { margin: 0; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }

/* ---- Varieties ---- */
.variety-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin: 28px 0; }
.variety-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.variety-card__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.variety-card__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.variety-card__body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.prose .variety-card__name { margin: 0 0 4px; font-size: var(--fs-xl); }
.prose .variety-card__type { margin: 0 0 12px; color: var(--accent-ink); font-family: var(--font-sans); font-size: var(--fs-xs);
  font-weight: 700; letter-spacing: var(--label-spacing); text-transform: uppercase; }
.prose .variety-card__desc { font-size: var(--fs-sm); line-height: 1.55; }
.prose .variety-card__specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 16px;
  font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.45; }
.variety-card__specs dt { color: var(--muted); font-weight: 700; }
.variety-card__specs dd { margin: 0; }
.prose .variety-card__authors { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted);
  font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.45; }
@media (max-width: 420px) { .prose .variety-card__specs { grid-template-columns: 1fr; } .variety-card__specs dd { margin-bottom: 6px; } }

/* ---- Home ---- */
.hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--border); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero__card { position: relative; z-index: 1; }
.hero__id { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.hero__id .eyebrow { margin-bottom: 4px; }
.hero__portrait { width: 88px; height: 88px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--teal); }
.hero__title { margin: 0; font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -0.025em; }
.hero__mission { margin: 0 0 14px; font-size: var(--fs-lead); line-height: 1.45; color: var(--ink); }
.hero__role { margin: 0 0 24px; max-width: 40rem; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 4px; }
.hero__mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.hero__mosaic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); }
.hero__mosaic img:nth-child(2) { margin-top: 36px; }
.hero__mosaic img:nth-child(3) { margin-top: 12px; }
.hero--photo { min-height: 520px; background: #1b1f23; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.hero__slide.is-active { opacity: 1; }
.hero--photo .hero__inner { grid-template-columns: minmax(0, 40rem); min-height: 520px; }
.hero--photo .hero__card { padding: 28px 30px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 18px; background: rgba(24, 30, 36, 0.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; }
.hero--photo .hero__title, .hero--photo .hero__mission { color: #fff; }
.hero--photo .hero__role { color: rgba(255, 255, 255, 0.82); }
.hero--photo .eyebrow { color: #ffb3b6; }
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; padding-bottom: 40px; }
  .hero__mosaic img { aspect-ratio: 4 / 5; }
}
.band { padding: 56px 0; }
.band--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band__head { margin-bottom: 24px; }
.band__head h2 { margin: 0 0 6px; font-size: var(--fs-2xl); }
.band__head p { margin: 0; max-width: 44rem; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-md); }
.band__head--row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.band__head--row a { font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.band__lead { margin: -12px 0 18px; color: var(--muted); font-family: var(--font-sans); }
.story-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.story-card { display: flex; flex-direction: column; padding: 24px 24px 22px; background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--teal); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.story-card:hover { border-color: var(--ink); border-top-color: var(--accent); color: var(--ink); }
.story-card .eyebrow { margin-bottom: 8px; }
.story-card__title { margin: 0 0 10px; font-size: var(--fs-xl); }
.story-card__text { flex: 1; margin: 0 0 16px; color: var(--ink-2); font-size: var(--fs-md); line-height: 1.55; }
.story-card__more { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-sm); }
.story-card:hover .story-card__more { color: var(--accent-ink); }
.story-grid--stacked { grid-template-columns: 1fr; margin: 1.5em 0 2.5em; }
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; } }
.home-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
@media (max-width: 860px) { .home-cols { grid-template-columns: 1fr; gap: 36px; } }
.mini-list { margin: 0; padding: 0; list-style: none; }
.mini-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list__title { display: block; color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-md); font-weight: 700; line-height: 1.35; text-decoration: none; }
.mini-list__title:hover { color: var(--accent-ink); }
.mini-list__meta { display: block; margin-top: 3px; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }
.variety-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.variety-strip a { display: block; color: var(--ink); text-decoration: none; font-family: var(--font-sans); font-weight: 700; }
.variety-strip img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.variety-strip a:hover { color: var(--accent-ink); }
@media (max-width: 760px) { .variety-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- Research pages ---- */
.prose .research__question { margin-bottom: 0.6em; font-size: var(--fs-lead); line-height: 1.4; color: var(--ink); }
.research__intro { color: var(--ink-2); font-size: var(--fs-base); max-width: 46rem; }
.method { margin-top: 2.6em; padding-top: 1.6em; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.prose .method h2 { margin-top: 0; }
.prose .method__claim { font-size: var(--fs-lg); font-style: italic; color: var(--ink); max-width: 46rem; }
.method__text { max-width: 46rem; }
.finding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 1.4em; }
@media (max-width: 720px) { .finding-grid { grid-template-columns: 1fr; } }
.finding { display: flex; flex-direction: column; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.prose .finding__year { margin: 0 0 6px; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; }
.finding__year em { font-weight: 600; }
.prose .finding__headline { margin: 0 0 8px; font-size: var(--fs-base); line-height: 1.3; }
.prose .finding__summary { flex: 1; margin: 0 0 12px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.prose .finding__links { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 700; }
.finding__links a { text-decoration: none; }
.finding__details { color: var(--muted); }

/* ---- Two columns: a list with a sticky side panel (Publications) ---- */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.with-aside__main { grid-column: 1; grid-row: 1; min-width: 0; }
.with-aside__side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 16px; }
.with-aside__main > .pub-group:first-child { margin-top: 0; }
.side-card { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-sans); }
.prose .side-card__label { margin: 0 0 8px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--label-spacing); text-transform: uppercase; }
.prose .side-card__note { margin: 14px 0 0; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-xs); line-height: 1.5; }
.prose .side-card__counts { margin: 0 0 16px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.jump-nav--side { margin: 0; gap: 6px; }
.jump-nav--side a { padding: 3px 10px; font-size: var(--fs-xs); }
.with-aside__side .metrics { margin: 0; padding: 16px 18px; }
.with-aside__side .metrics__row { gap: 8px 22px; }
.with-aside__side .metric__n { font-size: var(--fs-2xl); }
.with-aside__side .metrics__note { font-size: var(--fs-xs); }
@media (max-width: 960px) {
  .with-aside { grid-template-columns: 1fr; gap: 28px; }
  .with-aside__side, .with-aside__main { grid-column: 1; grid-row: auto; }
  .with-aside__side { position: static; }
}

/* ---- Sweet corn program page ---- */
.prose .standing-list { max-width: 52rem; padding-left: 1.2em; }
.standing-list li { margin: 0.45em 0; }
.standing-list a { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; margin-left: 4px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 1.2em 0 2em; }
.tool-tile { display: flex; flex-direction: column; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.prose .tool-tile__status { align-self: flex-start; margin: 0 0 10px; padding: 2px 10px; border-radius: 999px; font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; }
.tool-tile__status--use { background: var(--teal-soft); color: var(--teal); }
.tool-tile__status--transfer { background: var(--amber-soft); color: var(--amber-ink); }
.tool-tile__status--plan { background: var(--surface-2); color: var(--muted); }
.prose .tool-tile__name { margin: 0 0 6px; font-size: var(--fs-base); }
.prose .tool-tile__text { flex: 1; margin: 0 0 10px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.prose .tool-tile__pubs { margin: 0; padding: 10px 0 0; border-top: 1px solid var(--border); list-style: none; font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.4; }
.tool-tile__pubs li { margin: 0 0 6px; }
.tool-tile__pubs a { font-weight: 600; text-decoration: none; }
.tool-tile__pubs span { color: var(--muted); }
.prose .grant-list { padding: 0; list-style: none; max-width: 52rem; }
.grant-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0; }
.grant-list__role { font-family: var(--font-sans); font-weight: 700; color: var(--accent-ink); font-size: var(--fs-sm); }
.grant-list__years { grid-column: 1; grid-row: 2; font-family: var(--font-sans); color: var(--muted); font-size: var(--fs-sm); }
.grant-list__title { grid-column: 2; grid-row: 1 / span 2; }
.grant-list__funder { grid-column: 2; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }
@media (max-width: 600px) { .grant-list li { grid-template-columns: 1fr; } .grant-list__years, .grant-list__title, .grant-list__funder { grid-column: 1; grid-row: auto; } }
.story-card--feature { grid-column: 1 / -1; border-top-color: var(--accent); background: linear-gradient(120deg, var(--surface), var(--accent-soft)); }
.story-card--feature .story-card__title { font-size: var(--fs-2xl); }
.story-card--feature .story-card__text { max-width: 48rem; font-size: var(--fs-md); }

/* ---- News: a feed of items, one row each ---- */
.feed { margin: 14px 0 8px; border-top: 1px solid var(--border); }
.feed-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 16px 12px;
  margin: 0 -12px; border-bottom: 1px solid var(--border); }
.feed-item:hover { background: var(--surface-2); }
.feed-item__avatar { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.prose .feed-item__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 2px;
  color: var(--muted); font-size: var(--fs-sm); }
.feed-item__name { color: var(--ink); font-weight: 700; }
.feed-item__kind { padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; font-size: var(--fs-xs);
  text-transform: lowercase; }
.prose .feed-item__title { margin: 0 0 4px; font-size: var(--fs-md); line-height: 1.35; }
.feed-item__title a { color: var(--ink); text-decoration: none; }
.feed-item__title a:hover { color: var(--accent-ink); }
.feed-item__text p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.feed-item__media { display: block; margin-top: 10px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); }
.feed-item__media img { display: block; width: 100%; max-height: 460px; object-fit: contain; background: var(--surface-2); }
@media (max-width: 560px) { .feed-item { grid-template-columns: 1fr; } .feed-item__avatar { display: none; } }

/* ---- Software: one wide card per tool ---- */
.tool-list { display: flex; flex-direction: column; gap: 20px; }
.tool-card { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; padding: 26px 28px; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--teal); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 16px); }
.prose .tool-card__name { margin: 0 0 12px; font-size: var(--fs-xl); line-height: 1.25; }
.prose .tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.prose .tag-list li { margin: 0; padding: 1px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; }
.prose .tool-card__links { margin: 0; }
.tool-card__desc p { margin: 0; font-size: var(--fs-md); line-height: 1.6; color: var(--ink-2); }
@media (max-width: 860px) { .tool-card { grid-template-columns: 1fr; gap: 14px; padding: 20px; } }

.post-image { display: block; width: 100%; max-height: 520px; object-fit: contain; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 1.4em; }
.portrait { width: 180px; border-radius: 50%; }

/* ---- Lab pages (lab mode only) ---- */
.band--recruit { background: var(--teal-soft); border-top: 1px solid var(--border); padding: 36px 0; }
.band__lead--flush { margin: 0; }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.person-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.person-card__photo img, .person-card__initials { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 12px; object-fit: cover; }
.person-card__photo { text-decoration: none; }
.person-card__initials { background: var(--teal-soft); color: var(--teal); font-family: var(--font-sans); font-size: 40px; font-weight: 800; text-decoration: none; }
.prose .person-card__name { margin: 0 0 4px; font-size: var(--fs-lg); }
.person-card__name a { color: var(--ink); text-decoration: none; }
.prose .person-card__role { margin: 0 0 8px; color: var(--accent-ink); font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 700; }
.prose .person-card__bio { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.prose .alumni-list { padding: 0; list-style: none; }
.alumni-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--border); }
.alumni-list__name { font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-md); text-decoration: none; }
.alumni-list__role { color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }
.alumni-list__now { color: var(--ink-2); font-family: var(--font-sans); font-size: var(--fs-sm); }
.prose .album-year { margin-top: 1.6em; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--label-spacing); text-transform: uppercase; color: var(--muted); }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.album-item { margin: 0; }
.album-item__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.album-item__open img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.album-item figcaption { margin-top: 6px; color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-sm); }
.album-zoom { max-width: min(1100px, 94vw); padding: 12px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); }
.album-zoom::backdrop { background: rgba(15, 19, 22, 0.6); }
.album-zoom img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; }
.album-zoom p { margin: 8px 4px 0; font-family: var(--font-sans); font-size: var(--fs-sm); }

/* ---- Search ---- */
.search-open { width: auto; padding: 0 10px; gap: 8px; grid-auto-flow: column; }
.search-open__hint { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; }
@media (max-width: 960px) { .search-open__hint { display: none; } .search-open { width: 40px; padding: 0; } }
.search { width: min(640px, calc(100vw - 32px)); max-height: 75vh; margin: 10vh auto 0; padding: 0; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
.search::backdrop { background: rgba(15, 19, 22, 0.6); }
.search__bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); font-size: var(--fs-lg); color: var(--muted); }
.search__input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-base); }
.search__results { max-height: 52vh; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.search__hit { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 12px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-sans); }
.search__hit:hover, .search__hit:focus { background: var(--surface-2); color: var(--ink); outline: none; }
.search__hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__bar:focus-within { box-shadow: inset 0 -2px 0 var(--accent); }
.search__kind { grid-row: span 2; color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--label-spacing); text-transform: uppercase; padding-top: 3px; }
.search__title { font-weight: 700; line-height: 1.35; }
.search__meta { color: var(--muted); font-size: var(--fs-sm); }
.search__empty { padding: 14px; color: var(--muted); font-family: var(--font-sans); }
.search__hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-xs); }
.search__hint kbd { font-family: inherit; border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }

/* ---- Footer ---- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: 40px 0 34px; font-family: var(--font-sans);
  font-size: var(--fs-sm); color: var(--muted); }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; }
.site-footer p { margin: 0; }
.site-footer__name { color: var(--ink); font-size: var(--fs-md); font-weight: 800; margin-bottom: 4px !important; }
.site-footer__links { display: flex; flex-wrap: wrap; align-content: start; justify-content: flex-end; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.site-footer__links a:hover { color: var(--accent-ink); }
.site-footer__small { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); }
.site-footer__small p + p { margin-top: 6px; }
.site-footer__small a { color: var(--muted); }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr; } .site-footer__links { justify-content: flex-start; } }

/* ---- Motion and print ---- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .section-nav, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .page-body--with-nav { display: block; }
}

/* ---- Small helpers ---- */
.lead-note { color: var(--muted); font-family: var(--font-sans); font-size: var(--fs-md); }
