/* BiophysX shared styles */
:root {
  --bg: #ffffff; --alt: #f3f6f9; --card: #ffffff; --text: #17212b; --muted: #5a6b7b;
  --accent: #0f4c81; --accent-ink: #ffffff; --accent-soft: #e3edf7; --border: #dbe3ea;
  --hero: linear-gradient(135deg, #0d3b66 0%, #14639e 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151b; --alt: #151c24; --card: #1a232d; --text: #e7ecf1; --muted: #9aa8b6;
    --accent: #7fb4e8; --accent-ink: #0d1722; --accent-soft: #213447; --border: #2a3846;
    --hero: linear-gradient(135deg, #0b2742 0%, #124a77 100%);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Top navigation */
nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); text-decoration: none; }
nav ul { display: flex; gap: 4px 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
nav ul a { color: var(--text); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
nav ul a:hover, nav ul a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Hero */
.hero { background: var(--hero); color: #fff; padding: 64px 0 56px; }
.hero a { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; opacity: .8; margin: 0 0 12px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 16px; max-width: 780px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.1rem; max-width: 680px; margin: 0 0 26px; opacity: .92; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.btn.primary { background: #fff; color: #0d3b66; }
.btn.ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }

/* Sections */
section { padding: 52px 0; }
section.alt { background: var(--alt); }
h2 { font-size: 1.7rem; margin: 0 0 14px; letter-spacing: -0.01em; }
.sub { color: var(--muted); max-width: 720px; margin: 0 0 26px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
a.tile { display: block; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
a.tile:hover, a.tile:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
a.tile strong { display: block; color: var(--accent); margin-bottom: 4px; }
a.tile span { color: var(--muted); font-size: .9rem; }
a.tile .pill { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; margin-bottom: 10px; }
.cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Contact + footer */
address { font-style: normal; }
.funders { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.funders figure { margin: 0; }
.funders img { height: 56px; width: auto; background: #fff; padding: 6px 10px; border-radius: 8px; display: block; margin-top: 6px; }
.funders .pair { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.funders figcaption { font-size: .85rem; color: var(--muted); max-width: 260px; }
footer { border-top: 1px solid var(--border); padding: 22px 0 36px; color: var(--muted); font-size: .88rem; }
footer .wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
footer .logos { display: flex; gap: 14px; align-items: center; }
footer .logos img { height: 38px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; display: block; }

/* Extras used by other pages */
.btn.solid { background: var(--accent); color: var(--accent-ink); }
h3 { font-size: 1.1rem; margin: 26px 0 8px; }
.qr { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qr img { width: 150px; height: auto; background: #fff; border-radius: 8px; padding: 4px; border: 1px solid var(--border); }
.qr div { flex: 1; min-width: 240px; }
.qr p { margin: 0 0 14px; }
.hero p.lead:last-child { margin-bottom: 0; }
