/* ==========================================================================
   Xingbo Du — academic homepage
   ========================================================================== */

:root {
  --bg: #faf9f6;
  --surface: #f3f1ec;
  --surface-2: #ece9e2;
  --ink: #16181b;
  --ink-2: #464a50;
  --ink-3: #7a7e85;
  --rule: #e2dfd7;
  --rule-strong: #cfcbc1;
  --accent: #0d7470;
  --accent-ink: #0a5e5b;
  --accent-soft: #e2efec;
  --warm: #b4652a;
  --shadow: 0 1px 2px rgba(22, 24, 27, .04), 0 8px 24px -12px rgba(22, 24, 27, .10);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 1120px;
  --gutter: 24px;
  --label-col: 196px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214;
    --surface: #171a1d;
    --surface-2: #1d2124;
    --ink: #ecebe6;
    --ink-2: #b7b6b0;
    --ink-3: #85857f;
    --rule: #272a2e;
    --rule-strong: #363a3f;
    --accent: #5fc4bb;
    --accent-ink: #7fd6ce;
    --accent-soft: #15302e;
    --warm: #e39a5f;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101214;
  --surface: #171a1d;
  --surface-2: #1d2124;
  --ink: #ecebe6;
  --ink-2: #b7b6b0;
  --ink-3: #85857f;
  --rule: #272a2e;
  --rule-strong: #363a3f;
  --accent: #5fc4bb;
  --accent-ink: #7fd6ce;
  --accent-soft: #15302e;
  --warm: #e39a5f;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
p, li { text-wrap: pretty; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.link {
  color: var(--ink);
  background-image: linear-gradient(var(--rule-strong), var(--rule-strong));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color .15s ease, background-image .15s ease;
}
.link:hover { color: var(--accent-ink); background-image: linear-gradient(var(--accent), var(--accent)); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.topbar.scrolled { border-bottom-color: var(--rule); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--ink-3); font-style: italic; font-weight: 400; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 14px; color: var(--ink-2);
  padding: 6px 10px; border-radius: 999px;
  transition: color .15s ease, background-color .15s ease;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.active { color: var(--ink); }
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-left: 6px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--rule-strong); background: var(--surface); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 64px; align-items: start; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 76px); line-height: 1; letter-spacing: -.025em;
  margin: 0 0 28px;
}
.lede {
  font-family: var(--serif); font-size: clamp(20px, 2.3vw, 24px); line-height: 1.45;
  color: var(--ink); font-weight: 400; letter-spacing: -.005em;
  max-width: 36ch; margin: 0 0 24px;
  text-wrap: balance;
}
.lede em { font-style: italic; color: var(--accent-ink); }
.bio { color: var(--ink-2); max-width: 62ch; }
.bio strong { color: var(--ink); font-weight: 500; }

.contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-2);
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--bg);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.chip svg { width: 15px; height: 15px; flex: none; }
.chip:hover { color: var(--ink); border-color: var(--rule-strong); background: var(--surface); }
.chip.primary { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.chip.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

.portrait { position: relative; margin: 6px 0 0; }
.portrait img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 6px;
  filter: saturate(.9) contrast(1.02);
  box-shadow: var(--shadow);
}
.portrait figcaption {
  margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em;
  color: var(--ink-3); line-height: 1.5;
}

/* ---------- sections ---------- */
.section { border-top: 1px solid var(--rule); padding: 64px 0; }
.section .wrap { display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); gap: 32px; }
.section-label { position: relative; }
.section-label .inner { position: sticky; top: 92px; }
.section-label .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .06em; }
.section-label h2 {
  font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; letter-spacing: -.015em;
  margin: 6px 0 0;
}
.section-label p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; max-width: 22ch; }

/* ---------- research ---------- */
.theme-main {
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--surface);
  padding: 32px 32px 28px;
}
.tag {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 4px;
}
.tag.muted { color: var(--ink-3); background: var(--surface-2); }
.theme-main h3, .theme h3 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.01em;
  margin: 14px 0 10px;
}
.theme-main h3 { font-size: 27px; line-height: 1.2; text-wrap: balance; }
.theme-main > p { color: var(--ink-2); max-width: 64ch; }

.loop { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.loop::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 14px; height: 1px;
  background: var(--rule-strong);
}
.loop li { position: relative; padding-right: 18px; }
.loop .dot {
  position: relative; z-index: 1;
  width: 29px; height: 29px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--accent);
  font-family: var(--mono); font-size: 11.5px; color: var(--accent-ink);
}
.loop h4 { font-size: 15px; font-weight: 600; margin: 14px 0 4px; letter-spacing: -.005em; }
.loop p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.55; }

.next {
  margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--rule-strong);
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline;
}
.next .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--warm); white-space: nowrap; }
.next p { margin: 0; color: var(--ink-2); font-size: 15px; }
.next p strong { color: var(--ink); font-weight: 500; }

.works { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-3); }
.works b { color: var(--ink-2); font-weight: 500; }

.themes-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.theme { border: 1px solid var(--rule); border-radius: 10px; padding: 26px 26px 22px; }
.theme h3 { font-size: 21px; line-height: 1.25; }
.theme p { color: var(--ink-2); font-size: 15px; }
.theme .works { margin-top: 12px; }

/* ---------- publications ---------- */
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  font: inherit; font-size: 13.5px; color: var(--ink-2);
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; cursor: pointer;
  transition: all .15s ease;
}
.filter:hover { color: var(--ink); border-color: var(--rule-strong); }
.filter[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.filter .count { font-family: var(--mono); font-size: 11px; opacity: .6; margin-left: 4px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 32px; height: 18px; border-radius: 999px; background: var(--rule-strong); position: relative;
  transition: background-color .15s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); transition: transform .18s ease;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.pub-note { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }

.year-group { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 26px; }
.year-group[hidden] { display: none; }
.year { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 3px; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 22px; align-items: start; padding: 0 0 26px; }
.pub:last-child { padding-bottom: 4px; }
.pub-fig {
  display: block; width: 100%; aspect-ratio: 16 / 10; padding: 8px; margin: 2px 0 0;
  background: #fff; border: 1px solid var(--rule); border-radius: 6px;
  cursor: zoom-in; position: relative; overflow: hidden;
  transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease;
}
.pub-fig img { width: 100%; height: 100%; object-fit: contain; }
button.pub-fig:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
:root[data-theme="dark"] .pub-fig { border-color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pub-fig { border-color: transparent; } }
.pub[hidden] { display: none; }
.pub-venue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 5px; }
.venue {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; font-weight: 500;
  color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 1px 7px;
}
.venue.top { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.alias { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; }
.pub-title { font-family: var(--serif); font-size: 19px; line-height: 1.35; font-weight: 500; letter-spacing: -.005em; margin: 0 0 4px; color: var(--ink); text-wrap: pretty; }
.pub-authors { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.pub-authors .me { white-space: nowrap; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.pub-authors sup { font-size: 10px; margin-left: 1px; }
.pub-links { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; }
.pub-links a { color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; transition: color .15s ease; }
.pub-links a:hover { color: var(--accent-ink); }
.pub-links svg { width: 13px; height: 13px; }

.empty { color: var(--ink-3); font-size: 14px; padding: 18px 0; }

/* ---------- lightbox ---------- */
.lightbox {
  width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 20px 20px 16px; border: 0; border-radius: 10px;
  background: #fff; color: #16181b; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
.lightbox::backdrop { background: rgba(16, 18, 20, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; max-height: calc(100vh - 150px); object-fit: contain; }
.lb-cap { margin: 12px 36px 0 0; font-family: var(--serif); font-size: 16px; line-height: 1.4; color: #464a50; }
.lb-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid #e2dfd7; background: #fff; color: #464a50; font-size: 20px; line-height: 1; cursor: pointer;
}
.lb-close:hover { background: #f3f1ec; color: #16181b; }

/* ---------- patents ---------- */
.patents { margin-top: 44px; border: 1px solid var(--rule); border-radius: 10px; }
.patents summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.patents summary::-webkit-details-marker { display: none; }
.patents summary h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0; }
.patents summary .stats { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.patents summary .stats b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.patents .caret {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rule);
  display: grid; place-items: center; color: var(--ink-2); transition: transform .2s ease, background-color .15s ease;
}
.patents summary:hover .caret { background: var(--surface); }
.patents[open] .caret { transform: rotate(180deg); }
.patents .caret svg { width: 14px; height: 14px; }
.patent-list { list-style: none; margin: 0; padding: 0 24px 16px; border-top: 1px solid var(--rule); }
.patent-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px;
}
.patent-list li:last-child { border-bottom: 0; }
.patent-list .pt { color: var(--ink); }
.patent-list .pn { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.patent-list .granted { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-left: 8px; }

/* ---------- news ---------- */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.news li:first-child { padding-top: 2px; }
.news li[hidden] { display: none; }
.news time { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); padding-top: 2px; }
.news .t { color: var(--ink-2); }
.news .t b { color: var(--ink); font-weight: 500; }
.news .hl { color: var(--accent-ink); font-weight: 500; }
.more {
  margin-top: 18px; font: inherit; font-size: 14px; color: var(--ink-2);
  background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.more:hover { color: var(--accent-ink); }
.more svg { width: 14px; height: 14px; transition: transform .2s ease; }
.more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 116px 18px minmax(0, 1fr); gap: 0 16px; position: relative; }
.timeline .when { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); padding-top: 3px; text-align: right; }
.timeline .rail { position: relative; }
.timeline .rail::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: var(--rule-strong); }
.timeline li:first-child .rail::before { top: 9px; }
.timeline li:last-child .rail::before { bottom: auto; height: 9px; }
.timeline .rail::after {
  content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--ink-3);
}
.timeline li.now .rail::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline .what { padding-bottom: 28px; }
.timeline li:last-child .what { padding-bottom: 0; }
.timeline h4 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.timeline .org { color: var(--ink-2); font-size: 15px; }
.timeline .detail { color: var(--ink-3); font-size: 14px; margin-top: 4px; }

/* ---------- info grid ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 48px; }
.info h3 {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.info ul { list-style: none; margin: 0; padding: 0; }
.info li { padding: 6px 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.info li b { color: var(--ink); font-weight: 500; }
.info .sub { display: block; color: var(--ink-3); font-size: 13.5px; }
.info .yr { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill-list span { font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 4px; padding: 2px 8px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-3); }
.footer a:hover { color: var(--ink); }

/* ---------- reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  :root { --label-col: 1fr; }
  .section .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .section-label .inner { position: static; }
  .section-label p { max-width: none; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; }
  .pub { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav a:not(.keep) { display: none; }
  .hero { padding: 40px 0 48px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .portrait { order: -1; max-width: 168px; }
  .portrait figcaption { display: none; }
  .section { padding: 48px 0; }
  .theme-main { padding: 24px 20px 22px; }
  .loop { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .loop::before { left: 14px; right: auto; top: 14px; bottom: 14px; width: 1px; height: auto; }
  .loop li { display: grid; grid-template-columns: 29px 1fr; gap: 0 14px; padding: 0; }
  .loop li h4 { margin-top: 4px; }
  .loop li p { grid-column: 2; }
  .next { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .themes-sub { grid-template-columns: minmax(0, 1fr); }
  .theme { padding: 22px 20px 18px; }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pub-fig { aspect-ratio: 16 / 9; }
  .news li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .timeline li { grid-template-columns: 18px minmax(0, 1fr); }
  .timeline .when { grid-column: 2; grid-row: 1; text-align: left; padding: 0; }
  .timeline .rail { grid-column: 1; grid-row: 1 / span 2; }
  .timeline .what { grid-column: 2; }
  .info-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .patents summary { padding: 18px; }
  .patent-list { padding: 0 18px 12px; }
  .patent-list li { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .topbar, .theme-toggle, .pub-tools, .more, .footer, .lightbox { display: none !important; }
  .news li[hidden], .pub[hidden], .year-group[hidden] { display: grid !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding: 24px 0; }
}
