/* ==========================================================================
   - Consolidated sticky header
   - Fixed report cover placeholder behavior
   - Organized by: tokens → base → layout → components → sections → utilities
   ========================================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root{
  /* Brand */
  --charlotte-green: #005035;
  --niner-gold: #A49665;
  --ore-black: #101820;

  /* Neutrals */
  --text-gray: #444;
  --muted: #666;
  --light-bg: #f8f9fa;
  --border-color: #e5e5e5;

  /* Type */
  --font-main: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --page-max: 1100px;

  /* UI */
  --radius-sm: 4px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.10);
  --shadow-header: 0 6px 18px rgba(0,0,0,0.06);

  /* Sticky header scroll offset (tune as needed) */
  --sticky-offset: 120px;
}

/* ---------- BASE / RESET ---------- */
*{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
  scroll-padding-top: var(--sticky-offset); /* makes anchor jumps land below sticky header */
}

body{
  margin: 0;
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--ore-black);
  background: #fff;
}

h1, h2, h3, h4{
  margin-top: 0;
  line-height: 1.25;
}

a{
  color: var(--charlotte-green);
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

/* Better keyboard focus (accessibility) */
:focus-visible{
  outline: 3px solid rgba(164, 150, 101, 0.65);
  outline-offset: 3px;
}

/* ---------- LAYOUT ---------- */
.container{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- UTILITIES ---------- */
.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--niner-gold);
  color: #0b0f12;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-pill);
  z-index: 9999;
}
.skip-link:focus{
  left: 1rem;
  top: 1rem;
}

.clean-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.clean-list li{
  margin-bottom: 0.5rem;
}

.text-link{
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- HEADER / NAV ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;

  /* visual */
  background: var(--light-bg);
  border-top: 4px solid var(--charlotte-green);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-header);

  /* spacing */
  padding: 1rem 0;
}

.brandbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title{
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ore-black);
  margin: 0;
}

.site-subtitle{
  font-size: 0.9rem;
  color: #555;
}

nav ul{
  display: flex;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

nav a{
  color: var(--text-gray);
  font-weight: 500;
  padding: 0.25rem 0; /* gives a larger click target without changing layout */
}

nav a[aria-current="page"]{
  color: var(--charlotte-green);
  font-weight: 750;
}

/* ---------- PAGE HERO ---------- */
.page-hero{
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.breadcrumbs{
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.page-hero h1{
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--charlotte-green);
}

.lead-text{
  font-size: 1.15rem;
  max-width: 800px;
  color: #333;
  margin-bottom: 2.5rem;
}

/* ---------- METRICS BAR ---------- */
.metrics-bar{
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.metric{
  border-left: 3px solid var(--niner-gold);
  padding-left: 1rem;
}

.metric-num{
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--charlotte-green);
  line-height: 1;
}

.metric-label{
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

/* ---------- JUMP LINKS ---------- */
.jump-links{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.jump-label{
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.pill{
  background: var(--light-bg);
  border: 1px solid #ccc;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: #333;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill:hover{
  background: var(--charlotte-green);
  color: #fff;
  border-color: var(--charlotte-green);
  text-decoration: none;
}

/* ---------- THEME SECTIONS ---------- */
.theme-section{
  padding: 4rem 0;
  scroll-margin-top: var(--sticky-offset); /* helps when anchoring to #workforce, etc. */
}

.theme-header{
  max-width: 800px;
  margin-bottom: 2.5rem;
}

.theme-header h2{
  font-size: 1.75rem;
  color: var(--charlotte-green);
  margin-bottom: 1rem;
}

.theme-intro{
  font-size: 1.05rem;
  color: var(--text-gray);
}

.theme-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 800px){
  .theme-grid{ grid-template-columns: 1fr; }
}

/* Column headings */
.research-questions h3,
.featured-outputs h3,
.peer-reviewed-anchors h3{
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Left column list */
.research-questions ul{
  padding-left: 1.25rem;
  color: #333;
  margin-bottom: 2rem;
}

.research-questions li{
  margin-bottom: 0.75rem;
}

/* ---------- FEATURED OUTPUTS (cards) ---------- */
.pub-card{
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  transition: transform 0.2s ease;
}

.pub-card:hover{
  transform: translateX(5px);
}

.pub-cover{
  flex: 0 0 100px; /* fixed width for cover */
}

.pub-cover img{
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  display: block;
}

/* IMPORTANT FIX:
   Hide placeholder by default.
   Your onerror handler sets it to display:flex when the image fails. */
.cover-placeholder{
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #eee;
  display: none;                 /* <-- changed from flex */
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #aaa;
  border-radius: var(--radius-sm);
  border: 1px solid #ddd;
}

.pub-details h4{
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.pub-meta{
  font-size: 0.8rem;
  color: #777;
  font-style: italic;
  margin: 0 0 0.5rem 0;
}

.pub-desc{
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-gray);
}

/* ---------- DIVIDERS ---------- */
.section-divider{
  border: 0;
  border-top: 1px solid #eee;
  margin: 0;
}

/* ---------- BOTTOM STRIP ---------- */
.bottom-strip{
  background: var(--light-bg);
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
}

.strip-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.strip-col h3{
  font-size: 1.1rem;
  color: var(--charlotte-green);
  margin-bottom: 1rem;
}

.sponsor-tags span{
  display: inline-block;
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  margin: 0 0.25rem 0.25rem 0;
}

.cta-col{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

/* ---------- BUTTONS ---------- */
.btn{
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 650;
  text-align: center;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-primary{
  background: var(--charlotte-green);
  color: #fff;
  border: 1px solid var(--charlotte-green);
}

.btn-primary:hover{
  background: #003322;
  color: #fff;
  text-decoration: none;
}

.btn-outline{
  background: transparent;
  color: var(--charlotte-green);
  border: 1px solid var(--charlotte-green);
}

.btn-outline:hover{
  background: #eef5f2;
  text-decoration: none;
}

.btn-text{
  background: transparent;
  color: #555;
  padding-left: 0;
}

.btn-text:hover{
  color: var(--charlotte-green);
  text-decoration: none;
}

/* ---------- FOOTER ---------- */
footer{
  margin-top: 0;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid #eee;
}

/* ---------- MOTION PREFERENCES ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .pill, .pub-card{ transition: none; }
}

.pub-card--link{
  position: relative;
  cursor: pointer;
}

.pub-card--link:hover{
  transform: translateX(5px); /* if you already have hover transform, keep one */
}

.stretched-link::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Keep real text above the overlay (so selection still works nicely) */
.pub-details, .pub-cover{
  position: relative;
  z-index: 2;
}

/* Optional: show focus ring when keyboard-tabbing */
.pub-card--link:has(.stretched-link:focus-visible){
  outline: 3px solid rgba(164, 150, 101, 0.65);
  outline-offset: 4px;
  border-radius: 6px;
}

.alumni-photo-sm {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.alumni-position {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin: 0.15rem 0 0;
}