/* LangPro public interface — self-contained, no external assets. */

:root {
  --ink: #1f2229;
  --muted: #5d6470;
  --rule: #d9dce2;
  --paper: #ffffff;
  --paper-2: #f6f5f1;
  --blue: #001158;      /* Leiden University blue */
  --blue-soft: #e4e8f3;
  --orange: #f26e1c;    /* ERC orange */
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
a { color: var(--blue); }
a:hover { color: var(--orange); }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; color: var(--blue); line-height: 1.2; }
h1 { font-size: 2rem; margin: 1.4rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; border-bottom: 1px solid var(--rule); padding-bottom: .25rem; }

/* header */
.site-header { background: var(--blue); color: #fff; border-bottom: 4px solid var(--orange); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .6rem 2rem; padding-top: 1rem; padding-bottom: .9rem; }
.brand { color: #fff; text-decoration: none; display: block; }
.brand-name { display: block; font-family: var(--serif); font-size: 2.1rem; letter-spacing: .02em; line-height: 1; }
.brand-sub { display: block; font-size: .85rem; opacity: .85; margin-top: .35rem; }
.site-nav a { color: #fff; text-decoration: none; margin-left: 1.4rem; padding-bottom: .2rem; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--orange); color: #fff; }

/* footer */
.site-footer { margin-top: 3rem; background: var(--paper-2); border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.logos { display: flex; gap: 1.5rem; align-items: center; }
.logos img { height: 80px; width: auto; }
.site-footer p { margin: 0; max-width: 40em; }

/* home */
.intro { max-width: 46em; font-size: 1.05rem; }
.intro h1 { font-size: 1.9rem; }
.cta { margin-top: 2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.button { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; padding: .6rem 1.3rem; border-radius: 3px; font-weight: 600; }
.button:hover { background: var(--orange); color: #fff; }
.count { color: var(--muted); }

/* search */
.search-form { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.search-form .simple { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.search-form .simple label { font-weight: 600; }
.search-form input[type=search], .search-form input[type=text], .search-form select {
  font: inherit; padding: .4rem .6rem; border: 1px solid #b9bec8; border-radius: 3px; background: #fff; min-width: 0;
}
.search-form .simple input[type=search] { flex: 1; min-width: 14rem; }
.search-form button { font: inherit; background: var(--blue); color: #fff; border: 0; border-radius: 3px; padding: .45rem 1.1rem; cursor: pointer; }
.search-form button:hover { background: var(--orange); }
.advanced { margin-top: .9rem; border-top: 1px dashed var(--rule); padding-top: .7rem; }
.advanced summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.advanced .grid { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1rem; align-items: center; margin-top: .8rem; max-width: 40rem; }
.advanced .grid label, .advanced .grid .label { font-weight: 600; }
.advanced .radios label { font-weight: normal; margin-right: 1rem; }
.advanced .actions { margin-top: .9rem; display: flex; gap: 1rem; align-items: center; }
.reset { color: var(--muted); }

.results h2 { margin-top: 1rem; }
.results-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.results-table th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--rule); padding: .4rem .5rem; }
.results-table td { border-bottom: 1px solid var(--rule); padding: .5rem; vertical-align: top; }
.results-table tr:hover td { background: var(--blue-soft); }
.results-table .alt { color: var(--muted); font-size: .85rem; }
.pagination { display: flex; gap: 1.5rem; justify-content: center; margin: 1.5rem 0; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }

/* record */
.crumbs { margin: 1rem 0 0; font-size: .9rem; }
.record-head { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.record-head h1 { margin-bottom: .3rem; }
.aliases { margin: 0 0 1rem; color: var(--muted); }
.portraits { display: flex; gap: 1rem; flex-wrap: wrap; }
.portraits figure { margin: .5rem 0 0; max-width: 220px; }
.portraits img { max-width: 220px; max-height: 280px; border: 1px solid var(--rule); background: var(--paper-2); }
.portraits figcaption { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.5rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--blue); }
.facts dd { margin: 0; }
.facts dd > div + div { margin-top: .2rem; }
.note { color: var(--muted); font-size: .9rem; }
ul.plain, ul.works { padding-left: 1.2rem; }
ul.works li { margin-bottom: .4rem; }
ul.works .meta { display: block; color: var(--muted); font-size: .88rem; }
.remuneration { border-collapse: collapse; font-size: .95rem; }
.remuneration th, .remuneration td { text-align: left; border-bottom: 1px solid var(--rule); padding: .35rem .8rem .35rem 0; vertical-align: top; }
.remuneration th { color: var(--muted); font-weight: 600; }
.sources p { margin: 0 0 .4rem; }

@media (max-width: 640px) {
  html { font-size: 16px; }
  .facts, .advanced .grid { grid-template-columns: 1fr; gap: .15rem 0; }
  .facts dt { margin-top: .6rem; }
  .results-table th:nth-child(4), .results-table td:nth-child(4),
  .results-table th:nth-child(5), .results-table td:nth-child(5) { display: none; }
  .site-nav a { margin-left: 0; margin-right: 1.2rem; }
}

/* login */
.login { max-width: 24rem; }
.login .muted { color: var(--muted); }
.login .error { color: #a3271e; }
.login form { display: grid; gap: .35rem; margin-top: 1rem; }
.login label { font-weight: 600; margin-top: .5rem; }
.login input { font: inherit; padding: .45rem .6rem; border: 1px solid #b9bec8; border-radius: 3px; }
.login button { font: inherit; margin-top: 1rem; background: var(--blue); color: #fff; border: 0; border-radius: 3px; padding: .5rem 1.2rem; cursor: pointer; justify-self: start; }
.login button:hover { background: var(--orange); }
.site-nav .logout { display: inline; margin-left: 1.4rem; }
.site-nav .logout button { font: inherit; background: none; border: 0; color: #fff; opacity: .75; cursor: pointer; padding: 0; }
.site-nav .logout button:hover { opacity: 1; color: var(--orange); }
