/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --navy:        #162040;   /* header, footer, hero overlay */
  --navy-mid:    #1E2D52;   /* hover states */
  --orange:      #E87B1E;   /* primary accent — from TREN logo */
  --orange-dark: #C4660F;   /* orange hover */
  --orange-pale: #FDF0E2;   /* orange tint backgrounds */
  --text:        #1a1a1a;
  --text-muted:  #5a5a5a;
  --border:      rgba(0,0,0,0.1);
  --bg-alt:      #F0F0F0;   /* light gray content sections */
  --radius:      10px;
  --max-width:   900px;
}

/* ─── Base ───────────────────────────────────────────────── */
body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
}

/* ─── Nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 2px solid var(--orange);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; flex-direction: column; gap: 1px; }
.logo-mark { font-size: 15px; font-weight: 700; color: var(--orange); letter-spacing: 0.08em; }
.logo-sub  { font-size: 10px; color: rgba(255,255,255,0.6); }
.nav-logo-img { height: 36px; width: auto; display: block; }
.nav-logo-text { display: flex; flex-direction: column; gap: 1px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-size: 13px; color: rgba(255,255,255,0.75); }
.nav-links a:hover { color: var(--orange); }
.nav-links a.active { color: #fff; border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.nav-cta {
  font-size: 13px; color: #fff !important;
  background: var(--orange);
  border-radius: 6px; padding: 6px 14px;
}
.nav-cta:hover { background: var(--orange-dark) !important; }
.nav-toggle-checkbox { display: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; }
.nav-social { display: flex; align-items: center; gap: 12px; }
.nav-social-link { display: flex; color: rgba(255,255,255,0.75); }
.nav-social-link:hover { color: var(--orange); }
.social-icon { width: 16px; height: 16px; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* ← HERO IMAGE: replace static/images/hero.jpg with your own photo */

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(22,32,64,0.92) 0%, rgba(22,32,64,0.72) 55%, rgba(22,32,64,0.3) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}
.hero-kicker {
  font-size: 11px; color: var(--orange);
  border: 0.5px solid rgba(232,123,30,0.5);
  border-radius: 20px; padding: 4px 12px;
  display: inline-block; margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
}
.hero-h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600; line-height: 1.15;
  color: #fff; max-width: 600px;
  margin-bottom: 1rem; letter-spacing: -0.02em;
}
.hero-h1 em { font-style: normal; color: var(--orange); }
.hero-p { font-size: 15px; color: rgba(255,255,255,0.8); line-height: 1.7; max-width: 500px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 10px; }
.btn-primary {
  background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: 7px;
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost {
  color: #fff; font-size: 13px;
  padding: 10px 20px; border-radius: 7px;
  border: 0.5px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ─── Stats bar ──────────────────────────────────────────── */
.stats-bar {
  background: var(--navy);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  text-align: center; padding: 1.5rem 1rem;
  border-right: 0.5px solid rgba(255,255,255,0.1);
}
.stat:last-child { border-right: none; }
.stat-n { font-size: 32px; font-weight: 700; color: var(--orange); letter-spacing: -0.02em; line-height: 1; }
.stat-l { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 5px; line-height: 1.4; }

/* ─── Shared section ─────────────────────────────────────── */
.home-section { padding: 4rem 2rem; }
.home-section--alt { background: var(--bg-alt); }
.home-section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-header h2 { flex: 1; }
.see-all { font-size: 13px; color: var(--orange); white-space: nowrap; }
.see-all:hover { color: var(--orange-dark); }
.eyebrow {
  font-size: 11px; font-weight: 700; color: var(--orange);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem;
}

/* ─── News grid ──────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card {
  border: 0.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.news-card:hover { border-color: var(--orange); box-shadow: 0 2px 12px rgba(232,123,30,0.12); }
.news-card-img { width: 100%; height: 160px; object-fit: cover; }
/* ← NEWS IMAGES: place in content/news/[item-name]/[image.jpg] and reference in index.md */
.news-card-body { padding: 1rem; }
.news-card-body h3 { font-size: 13px; font-weight: 500; line-height: 1.45; margin: 6px 0; }
.news-date { font-size: 11px; color: var(--text-muted); }

/* ─── Tags ───────────────────────────────────────────────── */
.tag { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.tag-event       { background: var(--orange-pale); color: var(--orange-dark); }
.tag-milestone   { background: #EAF3DE; color: #27500A; }
.tag-publication { background: #E8EEF7; color: #1E3A6E; }
.tag-recap       { background: #F0EDFB; color: #3C2F89; }

/* ─── Events list ────────────────────────────────────────── */
.events-list { display: flex; flex-direction: column; gap: 10px; margin-top: 1.5rem; }
.event-row {
  display: flex; gap: 1rem; align-items: center;
  background: #fff; border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  transition: border-color .15s;
}
.event-row:hover { border-color: var(--orange); }
.event-date-block {
  min-width: 48px; text-align: center;
  background: var(--orange-pale); border-radius: 8px; padding: 8px;
}
.event-month { font-size: 10px; font-weight: 700; color: var(--orange); text-transform: uppercase; }
.event-day   { font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1; }
.event-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.event-loc   { font-size: 12px; color: var(--text-muted); }
.event-row-next { margin-left: auto; text-align: right; padding-left: 1rem; }
.event-row-next-label { font-size: 10px; font-weight: 700; color: var(--orange); text-transform: uppercase; margin-bottom: 3px; }
.event-row-next-date { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Institutions ───────────────────────────────────────── */
.institutions { padding: 2.5rem 2rem; border-top: 0.5px solid var(--border); }
.institutions-inner { max-width: var(--max-width); margin: 0 auto; }
.inst-label { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 1.25rem; }
.inst-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.inst-card {
  border: 0.5px solid var(--border); border-radius: var(--radius);
  padding: 1.125rem; text-align: center;
  transition: border-color .15s;
}
.inst-card:hover { border-color: var(--orange); }
.inst-abbr { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.inst-name { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ─── Page content ───────────────────────────────────────── */
.page-wrap { padding: 3rem 2rem; }
.page-inner { max-width: var(--max-width); margin: 0 auto; }
.page-header { margin-bottom: 2rem; border-bottom: 2px solid var(--orange); padding-bottom: 1.5rem; }
.page-header h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-top: 0.5rem; color: var(--navy); }
.page-date { font-size: 13px; color: var(--text-muted); margin-top: 0.5rem; }
.page-content { font-size: 16px; line-height: 1.75; max-width: 680px; }
.page-content h2 { font-size: 22px; font-weight: 600; margin: 2rem 0 0.75rem; color: var(--navy); }
.page-content h3 { font-size: 18px; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--navy); }
.page-content p  { margin-bottom: 1rem; }
.page-content a  { color: var(--orange); text-decoration: underline; }

/* ─── List pages ─────────────────────────────────────────── */
.list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 1.5rem; }
.list-card {
  border: 0.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #fff; transition: border-color .15s;
}
.list-card:hover { border-color: var(--orange); }
.list-card-img { width: 100%; height: 160px; object-fit: cover; }
.list-card-body { padding: 1rem; }
.list-card-body h2 { font-size: 14px; font-weight: 500; line-height: 1.45; margin: 6px 0; color: var(--navy); }
.list-date    { font-size: 11px; color: var(--text-muted); }
.list-summary { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer { background: var(--navy); padding: 2rem; border-top: 2px solid var(--orange); }
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-title { font-size: 13px; color: #fff; font-weight: 600; margin-bottom: 3px; }
.footer p { font-size: 12px; color: rgba(255,255,255,0.55); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.55); }
.footer-links a:hover { color: var(--orange); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--navy); border-bottom: 2px solid var(--orange);
    padding: 0.5rem 2rem 1rem;
  }
  .nav-toggle-checkbox:checked ~ .nav-links { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-links .nav-cta { margin-top: 8px; text-align: center; }
  .nav-social { margin-top: 8px; }
  .hero { min-height: 420px; padding: 2rem 0; }
  .hero-h1 { font-size: 28px; }
  .event-row { flex-wrap: wrap; }
  .event-row-next {
    margin-left: 0; text-align: left; padding-left: 0;
    width: 100%; margin-top: 8px; padding-top: 8px;
    border-top: 0.5px solid var(--border);
  }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .list-grid { grid-template-columns: 1fr; }
  .inst-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ─── Network map section ────────────────────────────────── */
.map-section { background:#fff; border-top:0.5px solid var(--border); border-bottom:0.5px solid var(--border); padding:2.5rem 2rem; }
.map-inner { max-width:var(--max-width); margin:0 auto; }
.map-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:1.25rem; flex-wrap:wrap; gap:0.75rem; }
.map-title { font-size:18px; font-weight:600; color:var(--navy); margin-top:4px; }
.map-legend { display:flex; gap:14px; align-items:center; flex-wrap:wrap; padding-top:4px; }
.legend-item { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--text-muted); white-space:nowrap; }
.leg-star { font-size:14px; color:#F5C518; line-height:1; }
.leg-dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.leg-line { display:inline-block; width:22px; height:2.5px; border-radius:1px; background:#1B5FAA; }
.leg-line--dash { background:repeating-linear-gradient(90deg,#1B5FAA 0,#1B5FAA 5px,transparent 5px,transparent 9px); }

#tren-map { height:420px; border-radius:var(--radius); border:0.5px solid var(--border); overflow:hidden; }

/* Hub marker pulse ring for degraded/down */
.tren-hub-marker { position:relative; display:flex; align-items:center; justify-content:center; }
.tren-pulse {
  position:absolute; width:32px; height:32px; border-radius:50%;
  opacity:0.3; animation:pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform:scale(0.9); opacity:0.3; }
  50%      { transform:scale(1.4); opacity:0.1; }
}

/* ─── Partners section ───────────────────────────────────── */
.partners-section { background:var(--bg-alt); border-top:0.5px solid var(--border); padding:3rem 2rem; }
.partners-inner { max-width:var(--max-width); margin:0 auto; }
.partners-title { font-size:24px; font-weight:600; color:var(--navy); text-align:center; margin-bottom:0.5rem; }
.partners-sub { font-size:14px; color:var(--text-muted); text-align:center; max-width:520px; margin:0 auto 2rem; line-height:1.6; }

.partners-group-label { font-size:10px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; text-align:center; margin:1.5rem 0 0.75rem; }
.partners-group-label:first-of-type { margin-top:0; }

.partners-row { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin-bottom:0.5rem; }

.partner-card {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; background:#fff; border:0.5px solid var(--border);
  border-radius:var(--radius); padding:0.875rem 1.125rem;
  text-decoration:none; transition:border-color .15s; min-width:110px; max-width:150px;
}
.partner-card:hover { border-color:var(--orange); }
.partner-card img { height:40px; width:auto; max-width:110px; object-fit:contain; }
.partner-card--primary img { height:48px; max-width:130px; }
.partner-name { font-size:10px; color:var(--text-muted); text-align:center; line-height:1.3; }
.partner-placeholder { font-size:14px; font-weight:700; color:var(--navy); height:40px; display:flex; align-items:center; }

@media (max-width:768px) {
  .map-header { flex-direction:column; align-items:flex-start; }
  #tren-map { height:300px; }
  .partners-row { gap:8px; }
  .partner-card { min-width:90px; padding:0.75rem; }
}

/* ─── Event row thumbnail ────────────────────────────────── */
.event-row-thumb { width:64px;height:64px;min-width:64px;object-fit:cover;border-radius:6px; }
.event-row-thumb--placeholder { background:var(--bg-alt);border:0.5px solid var(--border); }

/* ─── Event banner ───────────────────────────────────────── */
.event-banner { position:relative;height:380px;overflow:hidden; }
.event-banner-img { width:100%;height:100%;object-fit:cover;object-position:center;display:block; }
.event-banner-overlay { position:absolute;inset:0;background:linear-gradient(to top,rgba(22,32,64,0.88) 0%,rgba(22,32,64,0.3) 60%,transparent 100%);display:flex;align-items:flex-end; }
.event-banner-content { padding:2rem;max-width:var(--max-width);margin:0 auto;width:100%; }
.event-banner-title { font-size:clamp(22px,3vw,36px);font-weight:600;color:#fff;margin:0.5rem 0 0.4rem;letter-spacing:-0.02em; }
.event-banner-meta { font-size:14px;color:rgba(255,255,255,0.75); }

/* ─── Team grid ──────────────────────────────────────────── */
.team-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:20px;margin-top:1.5rem; }
.team-card { border:0.5px solid var(--border);border-radius:var(--radius);overflow:hidden;background:#fff;text-decoration:none;transition:border-color .15s; }
.team-card:hover { border-color:var(--orange); }
.team-card-photo { aspect-ratio:1;overflow:hidden;background:var(--bg-alt); }
.team-card-photo img { width:100%;height:100%;object-fit:cover;object-position:top;display:block; }
.team-card-photo--placeholder { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:700;color:var(--navy);background:var(--bg-alt); }
.team-card-info { padding:1rem; }
.team-card-name { font-size:14px;font-weight:600;color:var(--navy);margin-bottom:3px; }
.team-card-title { font-size:12px;color:var(--orange);margin-bottom:2px; }
.team-card-inst { font-size:11px;color:var(--text-muted); }

/* ─── Team member single ─────────────────────────────────── */
.member-layout { display:grid;grid-template-columns:240px 1fr;gap:3rem;align-items:flex-start; }
.member-photo { border-radius:10px;overflow:hidden;aspect-ratio:1;background:var(--bg-alt); }
.member-photo img { width:100%;height:100%;object-fit:cover;object-position:top;display:block; }
.member-photo--placeholder { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:52px;font-weight:700;color:var(--navy); }
.member-meta { margin-top:1rem;display:flex;flex-direction:column;gap:8px; }
.member-contact { display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-muted);text-decoration:none; }
.member-contact:hover { color:var(--orange); }
.member-header { margin-bottom:1.25rem;padding-bottom:1.25rem;border-bottom:0.5px solid var(--border); }
.member-name { font-size:28px;font-weight:600;color:var(--navy);letter-spacing:-0.02em;margin-bottom:4px; }
.member-role { font-size:16px;color:var(--orange);font-weight:500;margin-bottom:3px; }
.member-institution { font-size:14px;color:var(--text-muted); }
.member-tags { display:flex;flex-wrap:wrap;gap:6px;margin-bottom:1.5rem; }
.member-tag { font-size:11px;padding:3px 10px;border-radius:20px;background:var(--orange-pale);color:var(--orange-dark); }
.member-back { font-size:13px;color:var(--orange);text-decoration:none; }
@media(max-width:768px){ .member-layout{grid-template-columns:1fr;} .member-photo{max-width:200px;} }
