:root {
  --ink: #1b2330;
  --muted: #5b6573;
  --line: #e2e5ea;
  --bg: #fffff0;   /* ivory background from the old site */
  --soft: #f5f5e2;
  --navy: #001e62;
  --headline: #ff0000;  /* front-page headline: red, as on the old site */
  --accent: #d50032;
  --link: #0b4ea2;
  --max: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Source Serif 4", Georgia, "Times New Roman", serif;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3, .brand, .site-nav, .note, .affil, .site-foot {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
h1 { font-size: 2rem; line-height: 1.2; margin: 1.6rem 0 1rem; color: var(--navy); }
h2 { font-size: 1.3rem; margin: 2.2rem 0 .8rem; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }

/* Header */
.site-head { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); padding: 18px 0 0; }
.brand { font-size: 1.5rem; font-weight: 700; color: var(--navy); text-decoration: none; letter-spacing: -.01em; }
.affil { margin: .2rem 0 .8rem; font-size: .9rem; color: var(--muted); }
.affil a { color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0 -10px; }
.site-nav a {
  padding: 10px; font-size: .95rem; font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--navy); }

main { padding-bottom: 3rem; }
.site-foot { border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .85rem; padding: 18px 0; }
.note { color: var(--muted); font-size: .9rem; }

/* Home */
.hero h1 { font-size: 2.2rem; margin-top: 2rem; color: var(--headline); }
/* Front-page mosaic, arranged like the old site */
.mosaic {
  display: grid; gap: 14px 28px; justify-content: start;
  grid-template-columns: minmax(0, 570px) minmax(0, 290px);
  grid-template-areas: "main side" "covers side";
  margin-bottom: 3rem;
}
.mosaic img { display: block; max-width: 100%; height: auto; }
.m-main { grid-area: main; }
.m-covers { grid-area: covers; display: flex; justify-content: space-between; gap: 14px; }
.m-covers img { width: 42%; }
.m-side { grid-area: side; display: flex; flex-direction: column; gap: 60px; padding-top: 18px; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "covers" "side"; }
  .m-side { flex-direction: row; gap: 14px; padding-top: 0; }
  .m-side img { width: calc(50% - 7px); }
}

/* People */
.pi { display: flex; gap: 24px; align-items: flex-start; margin: 1rem 0 2rem; }
.pi img { width: 170px; border-radius: 6px; }
.pi h2 { border: 0; margin-top: 0; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.person { font-size: .92rem; line-height: 1.45; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: var(--soft); display: block; margin-bottom: .5rem; }
.person p { margin: 0; }

/* People: table layout like the old site */
h2.pi-name { border: 0; margin: 1rem 0 .4rem; font-weight: 500; }
h2.psec { border: 0; color: var(--ink); font-weight: 400; font-size: 1.15rem; margin: 2.2rem 0 .5rem; }
.ptable-wrap { overflow-x: auto; }
table.ptable { border-collapse: separate; border-spacing: 2px; border: 1px solid #b9b9b9; background: var(--bg); }
table.ptable td { border: 1px solid #c9c9c9; padding: 8px; vertical-align: middle; }
table.ptable td.ph { width: 160px; }
table.ptable td.ph img { width: 160px; height: 210px; object-fit: cover; display: block; }
table.ptable td.pinfo { min-width: 150px; font: .9rem/1.5 Arial, Helvetica, sans-serif; }
/* Phones: one person per row (photo + details), the pairs stack one under the other */
@media (max-width: 640px) {
  table.ptable, table.ptable tbody { display: block; }
  table.ptable { border: 0; }
  table.ptable tr { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 2px; margin-bottom: 2px; }
  table.ptable td { display: block; }
  table.ptable td.ph, table.ptable td.ph img { width: 100%; }
  table.ptable td.ph img { height: 150px; }
  table.ptable td.pinfo { min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
}

/* Research */
figure { margin: 1.5rem 0; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

/* Lists */
ul.plain { list-style: none; padding: 0; margin: .5rem 0 1rem; }
ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.strip { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.strip img { height: 160px; width: auto; border-radius: 6px; }

/* CV */
.cv-head { display: flex; gap: 24px; align-items: flex-start; }
.cv-head img { width: 160px; border-radius: 6px; }
.cv-head h1 { margin-top: 0; }

/* Publications */
.covers { display: grid; grid-template-columns: repeat(4, minmax(0, 240px)); gap: 0; margin-top: 1.5rem; align-items: start; }
.covers img { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
ol.pubs { padding-left: 3.2rem; max-width: 46rem; }
ol.pubs li { margin: 0 0 1.5rem; padding-left: .3rem; font-size: .95rem; }
ol.pubs li::marker { color: var(--muted); font-family: "Inter", system-ui, sans-serif; font-size: .85rem; }
a.pdf {
  display: inline-block; font: 600 .72rem/1 "Inter", system-ui, sans-serif; letter-spacing: .03em;
  padding: 3px 6px; border: 1px solid var(--accent); color: var(--accent); border-radius: 3px; text-decoration: none; vertical-align: 1px;
}
a.pdf:hover { background: var(--accent); color: #fff; }

/* Publicity */
.press { display: grid; gap: 8px; }
.press-item { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.press-item h3 { font-weight: 500; }
.press-item img { display: block; margin: .6rem 0; max-height: 520px; width: auto; border: 1px solid var(--line); }

/* Movies: same arrangement as the old page */
.movies { display: flex; flex-direction: column; gap: 6px; }
.movie h3 { font-weight: 400; font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
.movie .frames { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; }
.movie .frames img { display: block; max-width: 100%; height: auto; }
.movie .frames a img:hover { outline: 2px solid var(--accent); }
.movie p.mlinks { margin: .3rem 0 0; font: .82rem Arial, Helvetica, sans-serif; }
.movie p.mlinks a { text-decoration: none; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .pi, .cv-head { flex-direction: column; }
  .people { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  ol.pubs { padding-left: 2.4rem; }
  .strip img { height: 110px; }
}
