/* ==========================================================================
   SEFS Lab — shared stylesheet
   One file, plain CSS, no build step. Edit colors/fonts in :root below.
   ========================================================================== */

:root {
  --color-bg: #fafaf7;
  --color-text: #1f2320;
  --color-text-muted: #5b6460;
  --color-accent: #2f5233;       /* forest green, from the lab logo */
  --color-accent-light: #e7ede7;
  --color-border: #dedad0;
  --color-link: #2f5233;
  --color-link-hover: #1c3320;

  --color-nav-bg: #7a1014;       /* deep NC State red, muted for an academic register */
  --color-nav-text: #f5ece4;
  --color-nav-text-muted: #ddb9ab;
  --color-nav-accent: #ffffff;

  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  border-bottom: none;
  font-weight: 600;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-thickness: 2px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: 2rem; margin: 0 0 0.4em; }
h2 { font-size: 1.5rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }
h4 { font-size: 1.05rem; margin: 1.2em 0 0.3em; }

p { margin: 0 0 1em; }

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

li { margin-bottom: 0.4em; }

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

.site-header {
  background: var(--color-nav-bg);
  border-bottom: 3px solid #4d0a0d;
}

.nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.2rem;
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-nav-text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-brand:hover {
  color: #fff;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-nav-text-muted);
  padding: 0.2rem 0;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-nav-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

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

main.wide {
  max-width: 920px;
}

main.home {
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-section {
  padding: 3.2rem 1.5rem;
}

.home-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.home-hero {
  background: var(--color-bg);
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.home-research {
  background: #eef2ea;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.home-news {
  background: var(--color-bg);
}

.home-news .cta-link {
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.8rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

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

/* ---------- Homepage hero ---------- */

.hero {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.hero img {
  margin: 0 auto 1.5rem;
  max-width: 100%;
  width: 100%;
}

.hero-lede {
  font-size: 1.08rem;
  text-align: left;
  max-width: 680px;
  margin: 0 auto;
}

.hero-lede strong {
  color: var(--color-text);
}

/* ---------- Section intros ---------- */

.section-intro {
  color: var(--color-text-muted);
  margin-top: -0.3em;
  margin-bottom: 1.6em;
}

.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.3em;
}

/* ---------- Cards: research themes, news, software ---------- */

.card-list {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.3rem;
  align-items: start;
}

.card img {
  border-radius: 4px;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--color-border);
}

.card img.photo {
  object-fit: cover;
  background: none;
}

.card img.figure {
  object-fit: contain;
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.card-body h3 {
  margin-top: 0;
}

.card-body p {
  margin-bottom: 0.5em;
  color: var(--color-text);
}

.research-figure {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin: 0.8em 0 1.4em;
}

@media (max-width: 560px) {
  .research-figure {
    max-width: 100%;
    height: 180px;
  }
}

.card.no-image {
  grid-template-columns: 1fr;
}

@media (max-width: 560px) {
  .card {
    grid-template-columns: 1fr;
  }
  .card img {
    max-width: 280px;
    aspect-ratio: 4 / 3;
  }
}

/* ---------- People ---------- */

.people-group {
  margin-bottom: 2.5rem;
}

.person {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.3rem;
  margin-bottom: 2rem;
  align-items: start;
}

.person img {
  border-radius: 50%;
  width: 130px;
  height: 130px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.person-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.1em;
}

.person-role {
  color: var(--color-accent);
  font-size: 0.92rem;
  margin: 0 0 0.6em;
}

.person ul {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6em;
}

@media (max-width: 480px) {
  .person {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .person img {
    width: 100px;
    height: 100px;
  }
}

/* ---------- Publications ---------- */

.pub-year {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.3em;
  margin: 2.2em 0 0.9em;
}

.pub-year:first-of-type {
  margin-top: 1.2em;
}

.pub {
  margin-bottom: 1.3em;
  padding-bottom: 0.2em;
}

.pub-title {
  font-weight: 600;
  display: inline;
}

.pub-title-row {
  display: flex;
  gap: 0.5em;
  align-items: baseline;
}

.pub-number {
  font-weight: 600;
  color: var(--color-text-muted);
  font-family: var(--font-serif);
  flex-shrink: 0;
}

.pub-authors {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.pub-venue {
  display: block;
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.pub-links {
  font-size: 0.85rem;
  margin-top: 0.5em;
}

.pub-links a {
  text-decoration: none;
  margin-right: 0.5em;
  display: inline-block;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 0.2em 0.7em;
  border-radius: 3px;
  font-weight: 600;
}

.pub-links a:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ---------- Books ---------- */

.book {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.2rem;
  align-items: start;
}

.book-cover-link {
  display: block;
  border: none;
}

.book-cover {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.book-cover-link:hover .book-cover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}

.book-body h2 {
  margin-top: 0;
}

@media (max-width: 560px) {
  .book {
    grid-template-columns: 1fr;
  }
  .book-cover {
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ---------- Software ---------- */

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.software-tile {
  text-align: center;
}

.software-tile img {
  width: 100%;
  max-width: 160px;
  margin: 0 auto 1rem;
}

.software-tile h2 {
  margin: 0 0 0.5em;
  font-size: 1.25rem;
}

.software-tile p {
  text-align: left;
  font-size: 0.95rem;
}

.software-tile .software-links {
  text-align: center;
}

.software-links {
  font-size: 0.85rem;
  margin-top: 0.5em;
}

.software-links a {
  text-decoration: none;
  margin-right: 0.5em;
  display: inline-block;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 0.2em 0.7em;
  border-radius: 3px;
  font-weight: 600;
}

.software-links a:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ---------- Workshops / events ---------- */

.workshop {
  margin-bottom: 2.2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--color-border);
}

.workshop:last-child {
  border-bottom: none;
}

.workshop-meta {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0.1em 0 0.7em;
}

/* ---------- Misc content blocks ---------- */

.opportunities-block,
.contact-block {
  margin-bottom: 2rem;
}

blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 1.2em 0;
  padding: 0.2em 0 0.2em 1em;
  color: var(--color-text-muted);
}

code {
  background: var(--color-accent-light);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

.cta-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}
