/* ============================================================
   SCOUT — Shared Stylesheet
   Clean light scientific aesthetic
   ============================================================ */

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

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #f8fafc;
  --bg-card:     #ffffff;
  --bg-card-2:   #f1f5f9;
  --accent:      #2563eb;
  --accent-uv:   #7c3aed;
  --accent-warm: #d97706;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --border:      rgba(0,0,0,0.1);
  --nav-h:       70px;
  --max-w:       1200px;
  --radius:      8px;
  --font-sans:   'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ---------- Layout ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

section { padding: 6rem 0; }
section:nth-child(even) { background: var(--bg-card-2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
  section { padding: 4rem 0; }
}

/* ---------- Navigation ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(248,250,252,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); text-decoration: none; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
}

@media (max-width: 700px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg-card); padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(37,99,235,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(124,58,237,0.06) 0%, transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-uv));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #1d4ed8; text-decoration: none; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(0,0,0,0.04); text-decoration: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: rgba(37,99,235,0.3); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Stat / Badge ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }

.stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.05em; }

/* ---------- Page Header (interior pages) ---------- */
.page-header {
  padding: 4rem 0;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 1rem; }
.page-header p { color: var(--text-muted); max-width: 600px; font-size: 1.1rem; }

/* ---------- Section headings ---------- */
.section-head { margin-bottom: 3rem; }
.section-head h2 { margin-bottom: 0.75rem; }
.section-head p { color: var(--text-muted); max-width: 600px; }

/* ---------- Divider ---------- */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ---------- Tag / Pill ---------- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.tag-blue   { background: rgba(37,99,235,0.1);  color: #1d4ed8; }
.tag-purple { background: rgba(124,58,237,0.1); color: #6d28d9; }
.tag-amber  { background: rgba(217,119,6,0.1);  color: #b45309; }
.tag-green  { background: rgba(22,163,74,0.1);  color: #15803d; }

/* ---------- Accordion ---------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.accordion-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  color: var(--text);
  border: none;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.accordion-btn:hover { background: rgba(0,0,0,0.03); }
.accordion-btn .chevron { transition: transform 0.3s; }
.accordion-btn.open .chevron { transform: rotate(180deg); }
.accordion-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.accordion-body.open { display: block; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-uv));
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.4rem; top: 0.35rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-item h4 { margin-bottom: 0.25rem; }
.timeline-item p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- News Card ---------- */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.news-card:hover { border-color: rgba(37,99,235,0.3); transform: translateY(-2px); }
.news-card-body { padding: 1.5rem; }
.news-card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.news-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Publication Entry ---------- */
.pub-entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-entry:last-child { border-bottom: none; }
.pub-title { font-weight: 600; margin-bottom: 0.25rem; }
.pub-authors { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.pub-journal { font-size: 0.875rem; color: var(--accent); }

/* ---------- Field Site Card ---------- */
.site-hero {
  height: 320px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  overflow: hidden;
}
.site-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255,255,255,0.6) 0%, transparent 60%);
}
.site-hero-text { position: relative; z-index: 1; }
.site-hero-text h2 { color: var(--text); margin-bottom: 0.25rem; }
.site-hero-text p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Callout box ---------- */
.callout {
  border-left: 3px solid var(--accent);
  background: rgba(37,99,235,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.callout.purple {
  border-color: var(--accent-uv);
  background: rgba(124,58,237,0.05);
}

/* ---------- Team Card ---------- */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}
.team-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-uv));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}
.team-card h3 { margin-bottom: 0.25rem; }
.team-card .role { font-size: 0.8rem; color: var(--accent); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.5rem; }
.team-card .affil { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
footer {
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 3rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand { font-weight: 700; font-size: 1rem; color: #f1f5f9; margin-bottom: 0.5rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: #94a3b8; transition: color 0.2s; }
.footer-links a:hover { color: #f1f5f9; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ---------- Figure / Image ---------- */
.fig {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.fig img {
  width: 100%;
  display: block;
}
.fig-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

/* ---------- Utility ---------- */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-sm { gap: 0.5rem; }
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* ---------- Photo Sections (shared with landing page) ---------- */
.photo-section {
  position: relative;
  min-height: 42rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.photo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.502) 0%, rgba(18,18,18,0.122) 70%);
  pointer-events: none;
  z-index: 0;
}
.section-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 70rem;
  padding: 6rem;
  display: flex;
  align-items: flex-end;
  gap: 2rem;
}
.section-text { flex: 3; min-width: 0; }
.section-text h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section-text p {
  font-weight: 400;
  line-height: 1.875;
  color: rgba(255,255,255,0.788);
  max-width: 40.25rem;
  margin-top: 1rem;
}
.section-btn {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}
.pill-btn {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  height: 4.25rem;
  padding: 0 2.125rem;
  background: #ffffff;
  color: #000000;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1;
  border-radius: 3rem;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.pill-btn:hover { transform: scale(1.0425); text-decoration: none; }
.pill-btn .btn-icon {
  display: block;
  width: 1.125em;
  height: 1.125em;
  fill: #000000;
  margin-left: 1.125rem;
  flex-shrink: 0;
}
.section-page-nav {
  display: flex;
  align-items: center;
  padding-left: 2rem;
  gap: 2.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.section-page-nav.scroll-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.section-page-nav.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.section-page-nav a {
  color: #404040;
  text-decoration: none;
  font-weight: 500;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  transition: color 0.2s;
}
.section-page-nav a:hover { color: #000000; text-decoration: none; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #404040;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s;
}
@media (max-width: 768px) {
  /* Fixed bar across the top */
  .index-nav-wrapper { display: none; }
  .page-banner { min-height: 0 !important; height: 0; overflow: hidden; padding: 0; }
  .section-page-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    z-index: 10001;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  /* Logo and hamburger sit above the overlay in the nav's stacking context */
  .nav-logo-link {
    position: relative;
    z-index: 10001;
  }
  .nav-hamburger {
    display: flex;
    position: relative;
    z-index: 10001;
    background: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: 4px;
    box-shadow: none;
  }
  /* Hamburger → X */
  .section-page-nav.open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .section-page-nav.open .nav-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .section-page-nav.open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  /* Full-screen overlay */
  .section-page-nav .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(248, 250, 252, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    z-index: 10000;
    padding: 2rem;
  }
  .section-page-nav.open .nav-links { display: flex; }
  .section-page-nav .nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
  }
  .section-page-nav .nav-links img { height: 2.5rem; width: auto; }
}

/* ---------- Shared Site Header ---------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: 2.5rem 6rem;
  box-shadow: 0 0 2rem 0 rgba(0,0,0,0.04);
  background: #ffffff;
}
.site-header-inner {
  max-width: 70rem;
  width: 100%;
  text-align: center;
}
.site-header-inner a {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.375;
  color: #404040;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.site-header-inner a:hover { text-decoration: none; color: #404040; }

/* ---------- Shared Connect Footer ---------- */
.connect-section {
  display: flex;
  justify-content: center;
  padding: 6rem;
  background: #ffffff;
}
.connect-inner {
  max-width: 88rem;
  width: 100%;
  display: flex;
  gap: 6rem;
}
.connect-col { flex: 1 1 0; }
.connect-col:first-child { display: flex; justify-content: flex-end; flex: 2 1 0; }
.connect-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #404040;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: normal;
}
.connect-pstar {
  font-size: 0.875rem;
  color: #404040;
  line-height: 1.7;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  list-style: none;
  padding: 0;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #404040;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.social-link:hover { transform: scale(1.06); text-decoration: none; }
.social-link svg {
  display: block;
  width: 60%;
  height: 60%;
  fill: #ffffff;
}

@media (max-width: 736px) {
  .site-header { padding: 2rem 1.5rem; }
  .connect-section { padding: 4rem 1.5rem; }
  .connect-inner { flex-direction: column; gap: 3rem; }
  .connect-col:first-child { justify-content: flex-start; }
  .section-inner { padding: 3rem 2rem; flex-direction: column; align-items: flex-start; gap: 1.875rem; }
  .section-text h2 { font-size: 2rem; }
  .section-btn { justify-content: flex-start; }
  .section-page-nav { gap: 1.25rem; }
}
