/* Team website styles. Colours are defined once here; change them to match your main site. */
:root {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --fg: #1a1f2b;
  --muted: #5c6474;
  --line: #e1e4ea;
  --accent: #1c4f9c;
  --accent-soft: #e8eef8;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --surface: #1a1e26; --fg: #e5e8ee; --muted: #9aa2b1;
    --line: #2b313c; --accent: #8db1ee; --accent-soft: #1f2a3d;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; font-weight: 600; }
h2 { font-size: 1.35rem; font-weight: 600; margin-block: 2rem .75rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .9em; }
.wrap { max-width: 64rem; margin: 0 auto; padding-inline: 1.25rem; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem .5rem; }
.brand { font: 600 1.15rem/1.25 var(--serif); color: var(--fg); text-decoration: none; }
.lang { font-size: .85rem; border: 1px solid var(--line); border-radius: 4px; padding: .2rem .6rem; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding-block: .25rem .6rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding-block: .3rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

main { padding-block: 2.25rem 3.5rem; }
.intro { color: var(--muted); max-width: 42rem; margin-top: .5rem; }

/* home */
.hero { max-width: 44rem; }
.hero .lede { font-size: 1.08rem; margin-top: 1rem; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem 1.4rem; min-width: 0; }
.panel h2 { margin-top: 0; }
.more { display: inline-block; margin-top: .75rem; font-weight: 500; text-decoration: none; }
.axis-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.axis-list li { display: grid; grid-template-columns: 2.75rem 1fr; gap: .5rem; }
.axis-num { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.axis-list .axis-main { grid-template-columns: 1fr; gap: 0; margin-top: .75rem; }
.axis-list .axis-main:first-child { margin-top: 0; }
.axis-main .axis-num { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.axis-main span:last-child { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.axis-list li:not(.axis-main) { padding-left: 1rem; }
.team-strip { margin-top: 1rem; }

/* members */
.members { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.member p { margin: 0; font-size: .92rem; }
.member .photo { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 50%; margin-bottom: .4rem; background: var(--accent-soft); }
.member h3 a { color: var(--fg); text-decoration-color: var(--line); }
.member h3 a:hover { color: var(--accent); }
.research { color: var(--fg); }
.card-foot { margin-top: auto; padding-top: .5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; font-size: .88rem; }
.card-link { text-decoration: none; font-weight: 500; }
.badge { font-size: .75rem; background: var(--accent-soft); color: var(--accent); padding: .1rem .5rem; border-radius: 3px; }

/* publications */
.year { font-family: var(--sans); font-size: .95rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.pubs { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.pub { display: grid; gap: .1rem; max-width: 46rem; }
.pub-title { font-weight: 600; }
.pub-title a { text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.pub-authors, .pub-venue { font-size: .92rem; }
.pub-authors strong { font-weight: 600; }
.pub-venue { color: var(--muted); font-style: italic; }
.pubs.compact { gap: .8rem; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: 1.5rem; }
.filter-label { font-size: .85rem; color: var(--muted); margin-right: .25rem; }
.filter button { font: inherit; font-size: .82rem; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.count { margin-top: 1rem; font-size: .88rem; }

/* events */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.event { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.event-date { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92rem; }
.event-body { display: grid; }
.event-title { font-weight: 600; }
.event-body .muted { font-size: .9rem; }
.compact .event { grid-template-columns: 1fr; gap: 0; }
@media (max-width: 520px) { .event { grid-template-columns: 1fr; gap: 0; } }

/* students */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.5rem; font-size: .9rem; }
.chooser { padding-block: 4rem; text-align: center; font-size: 1.2rem; }

.hero .funder { font-family: var(--serif); font-size: 0.8rem; font-style: italic; letter-spacing: 0.01em; color: var(--muted, #666); margin: 0.2rem 0 0; }

.member-group h1 { font-size: 1.75rem; margin-block: 2.75rem 1.25rem; }
.member-group:first-child h1 { margin-top: 0.5rem; }
h1 + ol.events { margin-top: 1.25rem; }
