/* =====================================================================
   pedrorito.me — style.css  (single file, no framework)
   Mobile-first · light/dark automatic · tables -> cards on phones · print
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light dark;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg:        #ffffff;
  --bg-soft:   #f6f7f9;
  --bg-hover:  #eef2f7;
  --fg:        #1b1f24;
  --fg-muted:  #5b6470;
  --border:    #e2e6eb;
  --accent:    #0b5cad;       /* links, focus */
  --accent-fg: #ffffff;

  /* badge palette (bg / fg) */
  --b-journal-bg:#e3eefc; --b-journal-fg:#0b4a8b;
  --b-conf-bg:   #e6f4ea; --b-conf-fg:   #1e6b34;
  --b-other-bg:  #f1ecfb; --b-other-fg:  #5b3b9a;
  --b-award-bg:  #fff3cd; --b-award-fg:  #7a5200;
  --b-status-bg: #fde8e6; --b-status-fg: #9b2c20;
  --b-proj-bg:   var(--bg-soft); --b-proj-fg: var(--fg-muted);

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 2px 8px rgb(0 0 0 / .04);
  --maxw: 72rem;
  --measure: 68ch;
  --space: clamp(1rem, 2.5vw, 1.5rem);
  --nav-h: 3.25rem;
}

/* Dark tokens: explicit choice (toggle → <html data-theme="dark">) or system setting when no choice was made. */
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg:        #0f1216;
    --bg-soft:   #171b21;
    --bg-hover:  #1d232b;
    --fg:        #e6e9ee;
    --fg-muted:  #9aa4b2;
    --border:    #2a313b;
    --accent:    #6cb0ff;
    --accent-fg: #0f1216;

    --b-journal-bg:#13304f; --b-journal-fg:#a9d0ff;
    --b-conf-bg:   #143823; --b-conf-fg:   #a6e3b8;
    --b-other-bg:  #2b2245; --b-other-fg:  #d2c2ff;
    --b-award-bg:  #3d3010; --b-award-fg:  #ffd66b;
    --b-status-bg: #45201c; --b-status-fg: #ffb4a8;
    --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0f1216;
    --bg-soft:   #171b21;
    --bg-hover:  #1d232b;
    --fg:        #e6e9ee;
    --fg-muted:  #9aa4b2;
    --border:    #2a313b;
    --accent:    #6cb0ff;
    --accent-fg: #0f1216;

    --b-journal-bg:#13304f; --b-journal-fg:#a9d0ff;
    --b-conf-bg:   #143823; --b-conf-fg:   #a6e3b8;
    --b-other-bg:  #2b2245; --b-other-fg:  #d2c2ff;
    --b-award-bg:  #3d3010; --b-award-fg:  #ffd66b;
    --b-status-bg: #45201c; --b-status-fg: #ffb4a8;
    --shadow: none;
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
       scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 1rem/1.6 var(--font-sans);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw + .5rem, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 1.5vw + .9rem, 1.6rem); font-weight: 650; margin-top: 2rem; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 1rem; max-width: var(--measure); }
small, .muted { color: var(--fg-muted); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
code { font-family: var(--font-mono); font-size: .9em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--accent);
  color: var(--accent-fg); padding: .4rem .8rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: .5rem; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space); }
main { padding-block: 1.5rem 3rem; }
section + section { border-top: 1px solid var(--border); margin-top: 2rem; }

/* ---------- 4. Sticky nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.container.wide { max-width: 88rem; }
.site-nav .container { display: flex; align-items: center; gap: 1rem; min-height: var(--nav-h); }
.site-nav .brand { font-weight: 700; color: var(--fg); text-decoration: none; white-space: nowrap; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0 0 0 auto; padding: 0;
  flex-wrap: wrap; justify-content: flex-end; }   /* wraps instead of scrolling horizontally */
.site-nav a.nav-link { display: block; padding: .4rem .65rem; border-radius: var(--radius-sm);
  color: var(--fg-muted); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.site-nav a.nav-link:hover { background: var(--bg-hover); color: var(--fg); }
.site-nav a.nav-link[aria-current="page"] { color: var(--fg); background: var(--bg-soft); font-weight: 600; }
/* Phones: two rows — name + theme toggle, then the full menu (nothing cut off). */
@media (max-width: 30rem) {
  :root { --nav-h: 5.4rem; }
  .site-nav .container { flex-wrap: wrap; gap: 0 .5rem; padding-block: .3rem .25rem; }
  .site-nav .brand { line-height: 2.25rem; }
  .site-nav ul { order: 3; flex: 1 0 100%; margin: 0; justify-content: space-between; row-gap: 0; }
  .site-nav a.nav-link { padding: .35rem .45rem; }
  .site-nav .theme-toggle { margin-left: 0; }
}
@media (max-width: 23.5rem) { .site-nav a.nav-link { padding: .35rem .3rem; font-size: .9rem; } }
/* theme toggle (sun/moon) — right after the name, left of the nav bar */
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-left: -.4rem; padding: 0;
  border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--fg-muted); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--fg); background: var(--bg-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { display: block; }
.theme-toggle .i-sun, .theme-toggle[aria-pressed="true"] .i-moon { display: none; }
.theme-toggle[aria-pressed="true"] .i-sun { display: block; }

/* ---------- 5. Hero / bio ---------- */
.hero { display: grid; gap: 1.25rem; align-items: start; padding-top: 1rem; }
.hero .avatar { width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); background: var(--bg-soft); }
.hero .role { color: var(--fg-muted); font-size: 1.05rem; margin-bottom: 1rem; }
@media (min-width: 48rem) { .hero { grid-template-columns: auto 1fr; gap: 2rem; } .hero .avatar { width: 9rem; height: 9rem; } }

.hero .bio p { max-width: 44rem; }
/* small "Outside the lab" line (between Ongoing projects and Contact) */
.aside { font-size: .95rem; color: var(--fg-muted); margin-top: 2rem; }
.aside em { font-style: normal; font-weight: 600; color: var(--fg); }

/* Contact section: every contact-type item (email, address, profiles, social) lives here */
.contact-grid { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.contact-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-muted); margin: 0 0 .4rem; }
.contact-group p { margin: 0 0 .3rem; }

/* contact/profile links as compact pills */
.links { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.links a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem;
  border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--fg);
  font-size: .9rem; background: var(--bg); }
.links a:hover { background: var(--bg-hover); border-color: var(--accent); }
.links a .icon { flex: none; width: 1rem; height: 1rem; display: block; color: var(--fg-muted); }
.links a:hover .icon { color: inherit; }

/* ---------- 6. Cards & grids (index section tiles, projects) ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35rem; }
.card p { font-size: .95rem; margin-bottom: .5rem; }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--accent); }
.stat { font-size: 1.6rem; font-weight: 700; line-height: 1; }

/* ---------- 6b. Research topics (two prominent areas) ---------- */
.topics { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .topics { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }
.topic-card { --topic: var(--accent); position: relative; display: flex; flex-direction: column;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem; box-shadow: var(--shadow); overflow: hidden; }
.topic-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--topic); }
.topic-circuits { --topic: #b4581a; }
.topic-networks { --topic: var(--accent); }
:root[data-theme="dark"] .topic-circuits { --topic: #f0a35e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topic-circuits { --topic: #f0a35e; } }
.topic-kicker { margin: 0 0 .2rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--topic); }
.topic-card h3 { font-size: clamp(1.2rem, 1vw + 1rem, 1.45rem); margin-bottom: .35rem; }
.topic-summary { color: var(--fg-muted); margin-bottom: .9rem; }
.topic-subs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.topic-subs .chip { padding: .3rem .75rem; font-size: .88rem; border-color: color-mix(in srgb, var(--topic) 35%, var(--border)); }
.topic-subs .chip:hover { border-color: var(--topic); color: var(--topic); }
.chip.placeholder { border-style: dashed; color: var(--fg-muted); }
.topic-more { margin: auto 0 0; display: flex; gap: 1.25rem; font-size: .9rem; font-weight: 600; }
.topic-more a { text-decoration: none; color: var(--topic); }
.topic-more a:hover { text-decoration: underline; }

/* ---------- 7. Badges ---------- */
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem;
  font-weight: 600; line-height: 1.6; white-space: nowrap; vertical-align: .1em;
  background: var(--b-proj-bg); color: var(--b-proj-fg); border: 1px solid transparent; }
.badge.type-journal    { background: var(--b-journal-bg); color: var(--b-journal-fg); }
.badge.type-conference { background: var(--b-conf-bg);    color: var(--b-conf-fg); }
.badge.type-poster, .badge.type-demo, .badge.type-chapter, .badge.type-dataset,
.badge.type-patent, .badge.type-magazine, .badge.type-thesis
                       { background: var(--b-other-bg);   color: var(--b-other-fg); }
.badge.award           { background: var(--b-award-bg);   color: var(--b-award-fg); }
.badge.award::before   { content: "★ "; }
.badge.status          { background: var(--b-status-bg);  color: var(--b-status-fg); }
.badge.status-accepted { background: var(--b-conf-bg);    color: var(--b-conf-fg); }
.badge.status-submitted::before { content: "◷ "; }
.badge.status-accepted::before  { content: "✓ "; }
.badge.project         { background: transparent; border-color: var(--border); color: var(--fg-muted);
                         font-weight: 500; text-decoration: none; }
a.badge.project:hover  { border-color: var(--accent); color: var(--accent); }
.card .badge { border-color: var(--border); background: var(--bg); }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ---------- 7b. Section chips — the ONE shared in-page menu (chip_nav() in the generator, every page) ----------
   Always wraps onto the next line; never scrolls sideways. */
.chips ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1rem 0; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .4rem .3rem .8rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--fg);
  text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:only-child, .chip:not(:has(.chip-count)) { padding-right: .8rem; }
.chip:hover { border-color: var(--accent); background: var(--bg-hover); }
.chip-count, .count-pill { display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--fg-muted);
  font-size: .78rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.6; }
.count-pill { font-size: .8rem; vertical-align: .25em; margin-left: .25rem; }
.chip.is-empty { opacity: .45; }
@media (max-width: 40rem) {   /* phones: chips wrap onto the next line (no horizontal scrolling) */
  .chips ul { gap: .35rem; }
  .chips .chip { white-space: nowrap; max-width: 100%; }
}

/* ---------- 8. Filters (progressive enhancement; hidden without JS) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: 1rem 0; }
.filters label { display: grid; gap: .2rem; font-size: .8rem; color: var(--fg-muted); }
.filters input, .filters select {
  font: inherit; font-size: .95rem; color: var(--fg); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .4rem .6rem; min-height: 2.4rem; }
.filters input[type="search"] { min-width: min(100%, 16rem); }
.filters label { min-width: 0; max-width: 100%; }
.filters select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.filters label.check { display: flex; gap: .4rem; align-items: center; font-size: .9rem; color: var(--fg); min-height: 2.4rem; }
.filters .btn-reset { font: inherit; font-size: .9rem; min-height: 2.4rem; padding: .4rem .8rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--fg); cursor: pointer; }
.filters .btn-reset:hover { border-color: var(--accent); }
.filters .count { margin-left: auto; font-size: .85rem; color: var(--fg-muted); }
@media (max-width: 40rem) { .filters label { flex: 1 1 45%; } .filters label.grow { flex-basis: 100%; } }

/* ---------- 9. Data tables (publications, supervision, projects) ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: clip; } /* clip (not hidden) keeps sticky headers working */
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data caption { text-align: left; padding: .75rem 1rem; font-weight: 600; background: var(--bg-soft);
  border-bottom: 1px solid var(--border); }
table.data th, table.data td { padding: .65rem .8rem; text-align: left; vertical-align: top; }
table.data thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--fg-muted); background: var(--bg-soft); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--nav-h); z-index: 1; }
table.data tbody tr + tr td { border-top: 1px solid var(--border); }
table.data tbody tr:hover { background: var(--bg-hover); }
table.data .c-year  { width: 4.5rem; font-variant-numeric: tabular-nums; color: var(--fg-muted); white-space: nowrap; }
table.data .c-title .title { font-weight: 600; display: block; }
table.data .authors { display: block; font-size: .87rem; color: var(--fg-muted); margin-top: .15rem; }
table.data .authors .me { color: var(--fg); font-weight: 600; }
table.data .c-venue { min-width: 12rem; }
table.data .venue-extra { display: block; font-size: .85rem; color: var(--fg-muted); }
table.data .c-links { white-space: nowrap; }
table.data .c-projects { min-width: 7rem; max-width: 11rem; }
table.data .c-projects .badges { gap: .25rem; }
table.data .na { color: var(--border); }
table.data .status-text { font-size: .8rem; font-weight: 600; color: var(--b-status-fg); }
table.data .status-text.status-accepted { color: var(--b-conf-fg); }
table.data td.c-status { text-align: center; }
table.data a.jname { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: .2em; }
table.data a.jname:hover { color: var(--accent); text-decoration-color: currentColor; }
a.tag-filter { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem;
  margin-left: .3rem; vertical-align: -.25em; border: 1px solid var(--border); border-radius: 999px; color: var(--fg-muted); }
a.tag-filter:hover, a.tag-filter:focus-visible { color: var(--accent); border-color: var(--accent); background: var(--bg-hover); }

/* per-table status segmented control (next to the section heading) */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .6rem; }
.section-head h2 { margin: 0 !important; }
.status-filter { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.status-filter button { font: inherit; font-size: .82rem; padding: .3rem .75rem; border: 0; background: var(--bg); color: var(--fg-muted); cursor: pointer; }
.status-filter button + button { border-left: 1px solid var(--border); }
.status-filter button[aria-pressed="true"] { background: var(--accent); color: var(--bg); font-weight: 600; }
.status-filter button[aria-pressed="true"] .n { color: inherit; }
.status-filter .n { font-variant-numeric: tabular-nums; opacity: .75; margin-left: .15rem; }
table.data .c-links a { font-size: .85rem; }

/* per-section column helpers */
.pub-section { margin-top: 2.25rem; scroll-margin-top: calc(var(--nav-h) + .75rem); }
.pub-section h2 { margin: 0 0 .6rem; }
.pub-section .section-note { margin: -.3rem 0 .6rem; font-size: .9rem; }
section.pub-section + section.pub-section { border-top: 0; }
table.data .c-num { width: 2.5rem; color: var(--fg-muted); font-variant-numeric: tabular-nums; text-align: right; padding-right: .2rem; }
table.data th.h-num { text-align: right; padding-right: .2rem; }
table.data .c-small { font-size: .88rem; color: var(--fg-muted); white-space: nowrap; }
table.data .c-title { min-width: 18rem; }
table.data .c-title .badges { margin-top: .35rem; }
table.data td.c-year { white-space: nowrap; }
@media (min-width: 48rem) and (max-width: 70rem) { table.data .c-small { white-space: normal; } }

/* Narrow screens: each row becomes a stacked card; labels come from data-label */
@media (max-width: 47.99rem) {
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data caption { display: block; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; }
  table.data thead { display: none; }   /* cards carry their own labels (data-label) */
  table.data td, table.data td.c-small, table.data td.c-links, table.data td.c-year { white-space: normal; overflow-wrap: anywhere; }
  table.data tbody tr { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
    padding: .7rem .9rem; margin-bottom: .75rem; box-shadow: var(--shadow); }
  table.data tbody tr + tr td { border-top: 0; }
  table.data td { padding: .2rem 0; }
  table.data td[data-label]:not(.c-title)::before { content: attr(data-label); display: block;
    font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-muted); }
  table.data td:empty { display: none; }
  table.data .c-year { width: auto; display: inline-block; font-weight: 600; }
  table.data .c-title .title { font-size: 1.02rem; }
  table.data .c-venue { min-width: 0; }
  table.data td.c-links::before { display: none !important; }
  table.data td.c-num { display: inline-block; width: auto; text-align: left; padding: 0 .4rem 0 0; font-weight: 600; }
  table.data td.c-year::before { display: none !important; }
  table.data td.c-num::before { content: "#" !important; display: inline !important; font-size: inherit; text-transform: none; letter-spacing: 0; color: inherit; }
  table.data td.c-num::after { content: " ·"; color: var(--fg-muted); }
  table.data td.c-title { min-width: 0; }
  table.data td.c-small { display: inline-block; width: auto; white-space: normal; margin-right: 1rem; }
  table.data td.c-links { display: block; margin-top: .4rem; }
  table.data td:empty, table.data td.is-na { display: none !important; }   /* missing cells are hidden on phones */
  table.data td.c-projects { max-width: none; display: block; margin-top: .3rem; }
  table.data td.c-status { display: inline-block; width: auto; text-align: left; margin-right: 1rem; }
  .status-filter { width: 100%; } .status-filter button { flex: 1; padding-inline: .4rem; }
}

/* ---------- 10. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 1.5rem; font-size: .85rem; color: var(--fg-muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.sample-banner { background: var(--b-award-bg); color: var(--b-award-fg); border-radius: var(--radius-sm);
  padding: .5rem .8rem; font-size: .9rem; margin: 1rem 0; }

/* ---------- 11. Print ---------- */
@media print {
  :root, :root[data-theme], :root:not([data-theme="light"]) { --bg:#fff; --bg-soft:#fff; --bg-hover:#fff; --fg:#000; --fg-muted:#333; --border:#bbb; --accent:#000; }
  body { font-size: 10.5pt; }
  .site-nav, .filters, .chips, .topic-more, .status-filter, .tag-filter, .skip-link, .site-footer, .sample-banner { display: none !important; }
  main { padding: 0; }
  a { color: inherit; text-decoration: none; }
  .c-title a[href^="http"]::after, .c-links a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; word-break: break-all; }
  .table-wrap { border: 0; overflow: visible; }
  table.data thead th { position: static; }
  table.data tr { break-inside: avoid; }
  .badge { border: 1px solid #999; background: none !important; color: #000 !important; }
  h2 { break-after: avoid; }
}

/* filtered-out rows must stay hidden even when rows are display:block (mobile cards) */
table.data tr[hidden], [hidden] { display: none !important; }
.card .badge { white-space: normal; }

/* footer copyright, mirroring garagemrito.pt ("© 2026 Garagem Rito" / link) */
.site-footer .copyright { margin: 0; line-height: 1.6; }
/* projects page details */
table.data details { margin-top: .4rem; font-size: .88rem; color: var(--fg-muted); }
table.data details summary { cursor: pointer; color: var(--accent); width: max-content; }
table.data details p { margin: .35rem 0 0; max-width: 46rem; }

/* hero photo + non-linking sub-topic chips (until publications carry the keywords) */
.hero picture { display: block; line-height: 0; }
.hero .avatar { display: block; aspect-ratio: 1; height: auto; }
.chip.chip-static { cursor: default; }
.topic-subs .chip.chip-static:hover { border-color: color-mix(in srgb, var(--topic) 35%, var(--border)); color: inherit; background: none; }
