/* ManningGroup site — static rebuild
   Fonts: Source Serif 4 for headings (matches the original serif display type),
   system sans-serif for body text. */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --black: #111111;
  --bg: #f7f7f5;
  --text: #222222;
  --muted: #5a5a5a;
  --rule: #dcdcd8;
  --accent: #2f5d62;
  --accent-dark: #234548;
  --max-width: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
  color: var(--black);
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.7rem; margin-top: 2.2rem; }
h3 { font-size: 1.25rem; margin-top: 1.6rem; }

p { margin: 0 0 1em 0; }

a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: rgba(47,93,98,0.35); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

/* ---------- Header / nav ---------- */

header.site-header {
  background: var(--black);
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}

.brand span {
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}

nav.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

nav.primary-nav a {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.98rem;
}

nav.primary-nav a:hover,
nav.primary-nav a.active {
  color: #fff;
  border-bottom: 2px solid var(--accent);
}

/* mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  nav.primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.9rem;
    padding-top: 0.5rem;
  }
  nav.primary-nav.open { display: flex; }
}

/* ---------- Layout ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
}

.page-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 240px;
  margin: 0 auto 2rem auto;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}
.hero-slide.align-left {
  object-position: left center;
}
@media (max-width: 700px) {
  .hero-carousel { height: 160px; }
}

.lede {
  max-width: 720px;
  margin: 0 auto 2rem auto;
  font-size: 1.08rem;
}

.intro-center {
  text-align: center;
}

footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Reusable content blocks ---------- */

.section-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.section-block:last-child { border-bottom: none; }

.personnel {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
.personnel strong { color: var(--text); }

/* People grid */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  margin: 1.5rem 0 2.5rem 0;
}

.person-card {
  display: flex;
  flex-direction: column;
}
.person-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  background: #ddd;
}
.person-card h3 {
  margin-top: 0;
  margin-bottom: 0.15rem;
  font-size: 1.15rem;
}

.person-role {
  font-weight: 600;
  margin: 0 0 0.15rem 0;
}

.person-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.4rem 0;
}

.alumni-list {
  columns: 2;
  column-gap: 2.5rem;
}
@media (max-width: 700px) { .alumni-list { columns: 1; } }

.alumnus {
  break-inside: avoid;
  margin-bottom: 1.1rem;
}
.alumnus .name { font-weight: 600; }
.alumnus .meta { color: var(--muted); font-size: 0.92rem; }

/* Publications */
.pub-list {
  list-style: none;
  padding-left: 0;
  counter-reset: pub-counter;
}
.pub-list li {
  counter-increment: pub-counter;
  margin-bottom: 1.5rem;
  padding-left: 2.4em;
  position: relative;
}
.pub-list li::before {
  content: counter(pub-counter) ".";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pub-funding {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.pub-list.pub-list-reverse li {
  counter-increment: pub-counter -1;
}

/* Simple table-ish lists (teaching, etc.) */
.plain-list { list-style: disc; }

/* CV note box */
.note-box {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 3px;
  margin: 1.5rem 0;
}

/* Bluesky feed */
.bluesky-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bluesky-post {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem 1.25rem;
}
.bluesky-post-text {
  margin: 0 0 0.5rem 0;
}
.bluesky-post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.bluesky-post-meta a { color: var(--muted); text-decoration: underline; }
.bluesky-post-meta a:hover { color: var(--accent-dark); }
.bluesky-loading { color: var(--muted); }
.bluesky-follow { font-size: 0.9rem; margin-top: 0.75rem; }

/* Group photo captions */
.photo-year { font-weight: 600; margin-top: 1.5rem; }
.group-photo {
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 0.5rem 0 1rem 0;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

/* Password gate */
.password-gate {
  max-width: 380px;
  margin: 3rem auto;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  text-align: center;
}
.password-gate input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin: 1rem 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
.password-gate button {
  background: var(--black);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}
.password-gate button:hover { background: var(--accent-dark); }
.password-error {
  display: none;
  color: #b3261e;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.resource-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Research grid (same layout pattern as People grid) */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  margin: 1.5rem 0 2.5rem 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.project-card ul {
  margin-top: 0;
}

/* Project images */
.project-image {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 0 0.75rem 0;
  background: #ddd;
}

/* PDF viewer (CV page) */
.pdf-viewer-wrap {
  max-width: 850px;
  margin: 0 auto;
}
.pdf-viewer {
  width: 100%;
  height: 85vh;
  min-height: 500px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
}
.pdf-fallback-note {
  max-width: 850px;
  margin: 1rem auto 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
