/* =========================================================
   FIG — stylesheet (clean version)
   Colors, fonts and spacing live in the :root block below.
   ========================================================= */

:root {
  --color-bg:        #ffffff;
  --color-bg-alt:    #f7f6f4;
  --color-text:      #1a1a1a;
  --color-text-muted:#5c5c5c;
  --color-border:    #e2e0dc;
  --color-accent:    #1a1a1a;
  --color-accent-contrast: #ffffff;
  --color-red:       #D00000;   /* UNL red */

  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --content-narrow: 720px;
  --radius: 4px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ---------------------------------------------------------
   Reset & base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 400; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }

p {
  margin: 0 0 var(--space-2);
  max-width: 62ch;
  color: var(--color-text);
  text-align: justify;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
dl { margin: 0; }

.list-disc {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0 0 var(--space-3);
}

.list-disc li { margin-bottom: 0.4em; }

.wrap {
  max-width: 80vw;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section { padding: var(--space-5) 0; }

/* Equal-height sections (Work With Us) */
.same-height {
  display: flex;
  align-items: flex-start;
  min-height: 0 !important;        /* cancels any height set by the script */
  padding: var(--space-4) 0;       /* tighter than the default 4rem */
}

.same-height .wrap { width: 100%; }

.same-height + .same-height {
  border-top: 1px solid var(--color-border);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------
   Accessibility
   --------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: 100;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0.6em 1em;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  transition: top 0.15s ease;
}

.skip-link:focus { top: var(--space-2); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   Header / nav
   --------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--color-text);
}

.wordmark-short { display: none; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* ---------------------------------------------------------
   Buttons & links
   --------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 0.7em 1.4em;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.button-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
}

.text-link {
  display: inline-block;
  margin-top: var(--space-1);
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-accent);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  padding: var(--space-5) 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hero-stack .hero-inner {
  display: block;
}

.hero-visual {
  flex: 0 0 38%;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.hero-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--content-narrow);
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.hero-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin: -0.4em 0 var(--space-2);
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: left;
  }
  .hero-visual {
    flex-basis: auto;
    width: 70%;
    aspect-ratio: 1 / 1;
    align-self: flex-start;
  }
  .hero-content { max-width: none; }
}

/* ---------------------------------------------------------
   Hero with background picture
   (Work With Us = .hero-picture, Publications = + .hero-picture-pubs)
   --------------------------------------------------------- */
.hero-picture {
  padding-bottom: calc(var(--space-6) + 3rem);
  margin-bottom: -4rem;            /* pulls the next section up; picture size unchanged */
  background-color: #ffffff;
  background-image:
    linear-gradient(90deg, #ffffff 0%, #ffffff 42%, rgba(255,255,255,0) 60%),
    url("Images/Red-Network-Handshake.png");
  background-repeat: no-repeat;
  background-size: 100% 100%, auto 100%;
  background-position: center, right center;
}

.hero-picture-pubs {
  background-image:
    linear-gradient(90deg, #ffffff 0%, #ffffff 62%, rgba(255,255,255,0) 78%),
    url("Images/Red-Network-Publications.png");
  background-size: 100% 100%, auto min(100%, 420px);
  background-position: center, right center;
}

@media (max-width: 900px) {
  .hero-picture {
    background-image:
      linear-gradient(90deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.7) 100%),
      url("Images/Red-Network-Handshake.png");
    background-size: 100% 100%, cover;
    background-position: center, center;
  }

  .hero-picture-pubs {
    background-image:
      linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 100%),
      url("Images/Red-Network-Publications.png");
    background-size: 100% 100%, auto min(100%, 300px);
    background-position: center, right center;
  }
}

/* ---------------------------------------------------------
   Research page: two-column editorial layout
   --------------------------------------------------------- */
.research-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.research-row.reverse .research-text { order: 2; }

.research-text p { max-width: none; }

.research-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

@media (max-width: 800px) {
  .research-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .research-row.reverse .research-text { order: 0; }
}

/* ---------------------------------------------------------
   Publications page
   --------------------------------------------------------- */
.pub-stats {
  display: flex;
  gap: var(--space-4);
  margin: var(--space-3) 0 var(--space-2);
}

.pub-stats dd {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0;
}

.pub-stats dt {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.pub-list { border-top: 1px solid var(--color-border); }

.pub-entry {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.3em;
  max-width: 68ch;
}

.pub-title a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.pub-title a:hover { border-bottom-color: var(--color-accent); }

.pub-authors {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin: 0 0 0.2em;
}

.pub-meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
}

.pub-badge {
  display: inline-block;
  margin-left: var(--space-1);
  padding: 0.1em 0.6em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.78rem;
}

.pub-tag {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.05em 0.5em;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  vertical-align: middle;
}

/* ---------------------------------------------------------
   Home: intro grid & facts
   --------------------------------------------------------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: start;
}

.fact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.fact dt {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.2em;
}

.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

/* ---------------------------------------------------------
   Home: picture cards
   --------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.card {
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius);
  min-width: 0;
}

.card p { margin-bottom: 0; }

.card img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto;
}

.card figcaption {
  margin-top: var(--space-1);
  text-align: center;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  color: var(--color-red);
}

/* ---------------------------------------------------------
   News page
   --------------------------------------------------------- */
.news-entry {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.news-entry:first-child { padding-top: 0; }
.news-entry:last-child { border-bottom: none; }

.news-entry img {
  flex: 0 0 220px;
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}

.news-entry-body { min-width: 0; }
.news-entry-body h2 { margin-bottom: var(--space-1); }
.news-entry-body p { margin-bottom: 0; }

.news-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-red);
  margin-bottom: var(--space-1);
}

@media (max-width: 700px) {
  .news-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .news-entry img {
    flex-basis: auto;
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
/* Horizontal list with a | between items */
.list-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0;
  margin-bottom: var(--space-3);
}

.list-bar li + li::before {
  content: "|";
  margin: 0 1.25em;
  color: var(--color-border);
}

.list-bar + h3 {
  margin-top: var(--space-4);
}
/* ---------------------------------------------------------
   Home: news carousel
   --------------------------------------------------------- */
.news-banner {
  background: var(--color-bg-alt);
  padding: var(--space-4) 0;
}

.news-carousel {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.news-viewport {
  flex: 1 1 auto;
  overflow: hidden;
}

.news-track {
  display: flex;
  transition: transform 0.4s ease;
}

.news-item {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.news-item img {
  width: 220px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.news-item p {
  margin: 0;
  font-size: 1.2rem;
  max-width: 48ch;
}

.news-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 1.2rem;
  cursor: pointer;
}

.news-arrow:hover { background: var(--color-bg-alt); }

/* ---------------------------------------------------------
   People page
   --------------------------------------------------------- */
.people-inner { gap: var(--space-6); }

.people-visual {
  flex: 0 0 240px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.people-visual img { object-position: center top; }

.people-role {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: -0.4em 0 var(--space-3);
}

.degree-table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  margin-top: var(--space-3);
  font-size: 0.95rem;
}

.degree-table th,
.degree-table td {
  text-align: left;
  padding: 0.7em 1em 0.7em 0;
  border-bottom: 1px solid var(--color-border);
}

.degree-table th {
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .people-visual {
    flex-basis: auto;
    width: 160px;
    align-self: flex-start;
  }
}

@media (max-width: 560px) {
  .degree-table { font-size: 0.85rem; }
  .degree-table th,
  .degree-table td { padding: 0.5em 0.5em 0.5em 0; }
}

/* ---------------------------------------------------------
   Footer: copyright on the left, contact on the right
   --------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0;
  background: var(--color-bg-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.footer-inner p {
  margin: 0;
  max-width: none;
}

.footer-inner a[href^="mailto"] { white-space: nowrap; }

.footer-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.site-footer p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer a { color: var(--color-text); }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 800px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .wordmark-full { display: none; }
  .wordmark-short { display: inline; }
}
/* ---------------------------------------------------------
   Services cards
   --------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}

.service-card h3 {
  margin-bottom: 1rem;
}

.service-card .list-disc {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}
/* ---------------------------------------------------------
   Mobile fixes
   --------------------------------------------------------- */
@media (max-width: 700px) {
  .wrap {
    max-width: 100%;
  }

  p {
    text-align: left;
  }

  .site-nav ul {
    gap: 0.5rem 1.25rem;
  }

  h1 {
    font-size: 2rem;
  }
}
/* Floating contact box */
.float-contact {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  width: 300px;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.float-contact h2 {
  font-size: 1.1rem;
  margin: 0 1.5rem 0.5rem 0;
}

.float-contact p {
  max-width: none;
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.float-contact-email {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.float-contact-copy {
  padding: 0.4em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  font: inherit;
  cursor: pointer;
}

.float-contact-copy:hover { background: var(--color-border); }

.float-contact-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: 0;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

@media (max-width: 700px) {
  .float-contact {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    padding: 1rem;
  }
  .float-contact p { display: none; }
}

@media (max-width: 700px) {
  .news-carousel {
    flex-wrap: wrap;
    gap: 1rem 0.5rem;
  }

  .news-viewport {
    flex: 1 1 100%;
    order: 1;
    min-width: 0;
  }

  .news-arrow {
    order: 2;
    width: 40px;
    height: 40px;
  }

  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .news-item img {
    width: 100%;
    max-width: 220px;
  }

  .news-item p {
    font-size: 1.1rem;
    text-align: left;
  }
}