/* ==========================================================================
   SynTrace — project website
   Palette: deep navy (night city) + amber (glowing trajectories) + greys
   Type:    Sora (headings) / Source Sans 3 (body), self-hosted
   ========================================================================== */

/* ---------- self-hosted fonts ---------- */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 400;
  src: url('../vendor/fonts/sora-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 500;
  src: url('../vendor/fonts/sora-latin-500-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600;
  src: url('../vendor/fonts/sora-latin-600-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700;
  src: url('../vendor/fonts/sora-latin-700-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400;
  src: url('../vendor/fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600;
  src: url('../vendor/fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 700;
  src: url('../vendor/fonts/source-sans-3-latin-700-normal.woff2') format('woff2'); font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --ink:      #0B2239;
  --ink-soft: #14324F;
  --body:     #3D4F5F;
  --muted:    #6B7C8C;
  --paper:    #FFFFFF;
  --mist:     #F3F6F9;
  --line:     #DBE3EB;
  --amber:    #E08A2E;
  --amber-dk: #B96D18;

  --head: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --nav-h: 74px;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .font-head { font-family: var(--head); color: var(--ink); letter-spacing: -0.015em; }
h1 { font-weight: 600; }
h2 { font-weight: 600; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.18; }
h3 { font-weight: 600; font-size: 1.3rem; line-height: 1.3; }
h4 { font-weight: 600; font-size: 1.05rem; }

p { max-width: 72ch; }

a { color: var(--amber-dk); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 2000;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 4px;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- section rhythm ---------- */
.section { padding: 5.5rem 0; }
.section--mist { background: var(--mist); }
.section--ink  { background: var(--ink); color: #C7D5E2; }
.section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }

.section-head { margin-bottom: 2.75rem; }
.section-head p.lead-note {
  font-size: 1.1rem; color: var(--muted); margin-top: .65rem; max-width: 60ch;
}
.rule {
  width: 54px; height: 3px; background: var(--amber);
  border-radius: 2px; margin-bottom: 1.25rem;
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1030;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(11, 34, 57, 0);
  border-bottom: 1px solid rgba(255,255,255,0);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-solid {
  background: rgba(11, 34, 57, .96);
  border-bottom-color: rgba(255,255,255,.08);
  box-shadow: 0 6px 24px rgba(4, 16, 28, .18);
}
.site-header .navbar { padding-left: .75rem; padding-right: .75rem; }
@media (min-width: 576px) { .site-header .navbar { padding-left: 1rem; padding-right: 1rem; } }

.brand {
  font-family: var(--head); font-weight: 600; font-size: 1.4rem;
  color: #fff; text-decoration: none; letter-spacing: -0.02em;
}
.brand:hover { color: #fff; }
.brand .brand-syn { color: #fff; }
.brand .brand-trace { color: var(--amber); }

.nav-link {
  font-family: var(--head); font-size: .95rem; font-weight: 400;
  color: rgba(255,255,255,.82); padding: .4rem .85rem !important;
  border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link:focus { color: #fff; }
.nav-link.active { color: #fff; border-bottom-color: var(--amber); }

.navbar-toggler { border-color: rgba(255,255,255,.35); }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(11, 34, 57, .98);
    margin-top: .5rem; padding: .75rem 1rem 1rem; border-radius: 6px;
  }
  .site-header { background: rgba(11,34,57,.96); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(84vh, 760px);
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 3rem) 0 3.5rem;
  background: var(--ink) url('../img/hero.jpg') center 40% / cover no-repeat;
  color: #fff;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,20,34,.82) 0%, rgba(6,20,34,.50) 38%, rgba(6,20,34,.92) 100%),
    linear-gradient(90deg, rgba(6,20,34,.86) 0%, rgba(6,20,34,.55) 55%, rgba(6,20,34,.45) 100%);
}
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow {
  font-family: var(--head); font-size: .9rem; font-weight: 500;
  color: var(--amber); margin-bottom: 1rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.6rem);
  line-height: 1.08; margin-bottom: 1.1rem; max-width: 16ch;
}
.hero .hero-sub {
  font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem);
  color: rgba(255,255,255,.9); max-width: 58ch; margin-bottom: 2rem;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.75rem;
  padding-top: 1.75rem; margin-top: 2.25rem;
  border-top: 1px solid rgba(255,255,255,.22);
}
.hero-meta div { min-width: 130px; }
.hero-meta dt { font-size: .85rem; color: rgba(255,255,255,.62); font-weight: 400; }
.hero-meta dd {
  font-family: var(--head); font-size: 1.05rem; font-weight: 500;
  color: #fff; margin: .15rem 0 0;
}

/* ---------- buttons ---------- */
.btn { font-family: var(--head); font-weight: 500; border-radius: 3px; padding: .7rem 1.5rem; }
.btn-amber { background: var(--amber); border: 1px solid var(--amber); color: #14212E; }
.btn-amber:hover, .btn-amber:focus { background: #f0a04d; border-color: #f0a04d; color: #14212E; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn-outline-ink { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-outline-ink:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ---------- about / facts ---------- */
.facts {
  background: var(--paper); border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  padding: 1.75rem;
}
.section--mist .facts { background: #fff; }
.facts dl { margin: 0; }
.facts dt {
  font-size: .82rem; color: var(--muted); font-weight: 400;
  margin-top: 1.1rem;
}
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: .1rem 0 0; color: var(--ink); font-weight: 600; }
.facts dd.plain { font-weight: 400; color: var(--body); }

.figure-note { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

/* ---------- work packages ---------- */
.wp-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 768px)  { .wp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .wp-grid { grid-template-columns: repeat(3, 1fr); } }
.wp {
  background: #fff; padding: 1.9rem 1.6rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.wp-id {
  font-family: var(--head); font-size: .82rem; font-weight: 600;
  color: var(--amber-dk); letter-spacing: .04em;
}
.wp h3 { font-size: 1.12rem; margin: 0; }
.wp p { font-size: .98rem; margin: 0; color: var(--body); }
.wp-lead { font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .8rem; }

/* ---------- partners ---------- */
.partner {
  background: #fff; border: 1px solid var(--line); height: 100%;
  padding: 1.75rem; display: flex; flex-direction: column;
}
.partner-logo {
  height: 58px; width: auto; max-width: 100%;
  object-fit: contain; object-position: left center; margin-bottom: 1.25rem;
}
.partner h3 { font-size: 1.1rem; margin-bottom: .15rem; }
.partner .partner-place { font-size: .9rem; color: var(--muted); margin-bottom: .55rem; }
.partner .partner-pi {
  font-family: var(--head); font-weight: 500; font-size: .97rem;
  color: var(--amber-dk); margin-bottom: .75rem;
}
.partner p { font-size: .96rem; margin-bottom: 0; }
.partner .partner-role { margin-top: auto; padding-top: 1rem; font-size: .92rem; }

/* ---------- research artifacts box ---------- */
.filterbar {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding-bottom: 1.5rem; margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.filter-btn {
  font-family: var(--head); font-size: .9rem; font-weight: 400;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: .38rem 1rem; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-count { color: var(--muted); font-size: .85rem; margin-left: auto; align-self: center; }

.year-block { margin-bottom: 2.5rem; }
.year-block:last-child { margin-bottom: 0; }
.year-label {
  font-family: var(--head); font-weight: 600; font-size: 1.6rem;
  color: var(--ink); margin: 0 0 1rem; padding-bottom: .4rem;
  border-bottom: 2px solid var(--amber); display: inline-block;
}

.pub {
  display: grid; grid-template-columns: 88px 1fr; gap: 1.25rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line);
}
.pub:last-child { border-bottom: none; }
@media (max-width: 575.98px) { .pub { grid-template-columns: 1fr; gap: .5rem; } }

.pub-kind {
  font-family: var(--head); font-size: .72rem; font-weight: 600;
  letter-spacing: .03em; padding: .2rem .5rem; border-radius: 3px;
  align-self: start; justify-self: start; white-space: nowrap;
}
.kind-journal    { background: #E7F0F7; color: #1B4F7A; }
.kind-conference { background: #FDEEDC; color: #97570D; }
.kind-artifact   { background: #E6F3EF; color: #14634F; }
.kind-software   { background: #EFEAF7; color: #4B357F; }

.pub-authors { font-size: .95rem; color: var(--muted); margin-bottom: .15rem; }
.pub-title {
  font-family: var(--head); font-weight: 500; font-size: 1.02rem;
  color: var(--ink); line-height: 1.4; margin-bottom: .2rem;
}
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--amber-dk); text-decoration: underline; }
.pub-venue { font-size: .93rem; color: var(--body); }
.pub-links { margin-top: .35rem; font-size: .88rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.pub-links a { text-decoration: none; }
.pub-links a:hover { text-decoration: underline; }

.empty-state {
  padding: 2.5rem 0; color: var(--muted);
}

/* ---------- funding + contact ---------- */
.grant-table { width: 100%; max-width: 30rem; margin-top: 1.75rem; font-size: .95rem; }
.grant-table caption {
  caption-side: top; font-family: var(--head); font-weight: 500;
  color: #fff; padding: 0 0 .5rem;
}
.grant-table th, .grant-table td {
  padding: .5rem .25rem; border-bottom: 1px solid rgba(255,255,255,.14);
  font-weight: 400; color: #C7D5E2; text-align: left;
}
.grant-table td { text-align: right; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.grant-table tr:last-child th, .grant-table tr:last-child td { border-bottom: none; }

.funding-logos { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; }
.funding-logos img { height: 76px; width: auto; background: #fff; padding: .5rem; }

.contact-card {
  border: 1px solid rgba(255,255,255,.18); padding: 1.75rem; height: 100%;
}
.contact-card a { color: var(--amber); }
.contact-card a:hover { color: #fff; }

.site-footer { background: #071827; color: rgba(255,255,255,.6); padding: 1.75rem 0; font-size: .9rem; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 999;
  width: 42px; height: 42px; border: none; border-radius: 3px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.to-top.is-visible { opacity: .9; pointer-events: auto; }
.to-top:hover { opacity: 1; }
