/* ---------------------------------------------------------------
   Jonathan Cervas — site styles
   One stylesheet. CMU red accent (#C41230). No frameworks.
   --------------------------------------------------------------- */

:root {
  --red: #C41230;        /* Carnegie red */
  --red-dark: #9e0f27;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e4e4e4;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --wrap: 860px;
  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

/* Animated underline-swipe on content links (from the old site):
   underline grows from left to right on hover. */
main a, .site-footer a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 .0625em no-repeat;
  padding-bottom: .0625em;
  transition: background-size .4s ease, color .4s ease;
}
main a:hover, .site-footer a:hover {
  text-decoration: none;
  background-size: 100% .0625em;
}

/* The hero pill buttons keep their own style, not the swipe */
.hero__links a { background: none; padding-bottom: 0; transition: background .2s ease, color .2s ease; }

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
img { max-width: 100%; height: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 3px solid var(--red);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.site-brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.site-brand:hover { color: var(--red); text-decoration: none; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: var(--ink); font-weight: 500; font-size: 1rem;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--red); text-decoration: none; border-bottom-color: var(--red); }
.site-nav a.active { color: var(--red); border-bottom-color: var(--red); }

/* mobile menu toggle (hidden on desktop) */
.nav-toggle, .nav-toggle-label { display: none; }

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
}
.hero__inner {
  display: flex; align-items: center; gap: 2.5rem;
  padding: 3rem 1.25rem; max-width: var(--wrap); margin: 0 auto;
}
.hero__photo {
  flex: 0 0 200px; width: 200px; height: 200px;
  border-radius: 50%; object-fit: cover;
  border: 5px solid rgba(255,255,255,.85);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.hero__text h1 { margin: 0 0 .35rem; font-size: 2.4rem; }
.hero__text .tagline { margin: 0 0 1rem; font-size: 1.15rem; opacity: .95; }
.hero__links { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__links a {
  color: #fff; border: 1.5px solid rgba(255,255,255,.7);
  padding: .4rem .9rem; border-radius: 999px; font-size: .95rem; font-weight: 500;
}
.hero__links a:hover { background: #fff; color: var(--red); text-decoration: none; }

/* ---------- Page content ---------- */
.page { padding: 2.5rem 1.25rem 1rem; }
.page-title { font-size: 2rem; margin: 0 0 1rem; }
.home-section { padding: 2.5rem 1.25rem; }
.home-section:nth-of-type(even) { background: var(--bg-alt); }
.home-section .inner { max-width: var(--wrap); margin: 0 auto; }
.section-lead { color: var(--muted); margin-top: -.25rem; }
.more-link { display: inline-block; margin-top: 1rem; font-weight: 600; }

/* ---------- Publications ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.pub-list li:last-child { border-bottom: none; }
.pub-title { font-weight: 600; }
.pub-meta { color: var(--muted); font-size: .95rem; }
.pub-year { color: var(--red); font-weight: 700; }

/* ---------- Redistricting cases ---------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.case {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
}
.case img { width: 100%; height: 160px; object-fit: cover; background: var(--bg-alt); }
.case__body { padding: 1rem 1.1rem 1.25rem; }
.case__body h3 { margin: 0 0 .1rem; }
.case__sub { color: var(--red); font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.case__body p { font-size: .95rem; margin: 0; }

/* ---------- Media ---------- */
.media-inquiries {
  border: 1px solid var(--line); border-radius: 8px;
  padding: .75rem 1rem; margin-bottom: 1.5rem; background: var(--bg-alt);
}
.media-inquiries summary { cursor: pointer; }
.media-inquiries address { font-style: normal; margin-top: .6rem; color: var(--muted); }

.media-featured { display: grid; gap: 1.25rem; margin-bottom: 1rem; }
.media-feature { border-left: 3px solid var(--red); padding: .25rem 0 .25rem 1.1rem; }
.media-feature h3 { margin: 0 0 .1rem; font-size: 1.15rem; }
.media-outlet { color: var(--red); font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.media-feature p { margin: 0 0 .5rem; font-size: .97rem; }

.media-year {
  font-size: 1.05rem; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: .3rem; margin: 1.75rem 0 .75rem;
}
.media-list { list-style: none; margin: 0; padding: 0; }
.media-list > li { padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.media-list > li:last-child { border-bottom: none; }
.media-date { color: var(--ink); font-weight: 600; white-space: nowrap; }
.media-src { font-style: italic; color: var(--muted); }
.media-quotes { margin: .5rem 0 .25rem; padding-left: 1.1rem; border-left: 2px solid var(--line); }
.media-quotes li { color: var(--muted); font-size: .92rem; margin-bottom: .35rem; list-style: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 3rem;
  padding: 1.5rem 0; color: var(--muted); font-size: .9rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .hero__inner { flex-direction: column; text-align: center; padding: 2.25rem 1.25rem; }
  .hero__links { justify-content: center; }
  .hero__text h1 { font-size: 2rem; }

  .nav-toggle-label {
    display: block; cursor: pointer; padding: .5rem;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block; width: 24px; height: 2px; background: var(--ink);
    position: relative; transition: .2s;
  }
  .nav-toggle-label span::before, .nav-toggle-label span::after { content: ""; position: absolute; }
  .nav-toggle-label span::before { top: -7px; }
  .nav-toggle-label span::after { top: 7px; }

  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 3px solid var(--red); padding: .5rem 1.25rem 1rem;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: .6rem 0; border-bottom: 1px solid var(--line); }
}
