/* ===========================================================
   Segal Lab — stylesheet
   =========================================================== */

:root {
  --ink: #0b1220;
  --ink-soft: #182234;
  --cream: #faf7f2;
  --paper: #ffffff;
  --text: #1c1f26;
  --text-muted: #5b6270;
  --cyan: #0891b2;
  --cyan-bright: #22d3ee;
  --coral: #f43f5e;
  --coral-soft: #fb7185;
  --violet: #7c6ff0;
  --border: #e6e1d8;
  --radius: 14px;
  --shadow: 0 12px 32px -16px rgba(11, 18, 32, 0.25);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
}
.brand-logo { height: 52px; width: auto; display: block; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.6rem);
}
.primary-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.active { color: var(--ink); border-color: var(--cyan); }
.primary-nav a.nav-cta {
  color: #fff;
  background: var(--cyan);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border-bottom: none;
  font-weight: 600;
}
.primary-nav a.nav-cta:hover { background: #0e7490; color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #fff;
  color: var(--ink);
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
  margin: 0 0 1rem;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 1.4rem;
}
.hero-sub {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.2rem;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
  color: #08131a;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(34, 211, 238, 0.55); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--cream); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; background: var(--paper); }
.section-alt { background: var(--cream); }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  margin: 0 0 0.6rem;
}
h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 1.4rem;
  color: var(--ink);
}
.subsection-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.4rem 0 1rem;
  color: var(--ink);
}
.lede { max-width: 760px; }
.lede p, .lede-single { color: var(--text-muted); font-size: 1.03rem; max-width: 760px; }
.lede p + p { margin-top: 1rem; }

/* Approach strip */
.approach-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.4rem 0 1rem;
}
.approach-item {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.approach-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.approach-icon svg { width: 100%; height: 100%; }
.approach-item h3 { font-size: 1.05rem; margin: 0 0 0.4rem; font-family: var(--font-head); font-weight: 600; }
.approach-item p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* Project cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-media { margin: 0 0 1.1rem; }
.project-media figure { margin: 0; }
.project-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
.project-media figcaption {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.project-media-tall { max-width: 260px; margin-left: auto; margin-right: auto; }

/* Imaging strip (GIFs under the hero) */
.imaging-strip { background: #fff; padding: 0 0 3rem; }
.gif-row {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}
.gif-caption {
  margin: 0.8rem auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
}
.gif-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
.project-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.project-number {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--violet));
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.project-card h4 {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.project-card p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

.research-outlook {
  margin-top: 2.4rem;
  padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--cyan);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-size: 0.98rem;
}

/* People */
.pi-card {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.pi-avatar {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-bright), var(--coral-soft));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 600;
  object-fit: cover;
}
.pi-info h3 { font-family: var(--font-head); font-size: 1.4rem; margin: 0 0 0.2rem; }
.pi-title { color: var(--cyan); font-weight: 600; margin: 0; font-size: 0.95rem; }
.lab-launch-note {
  margin-top: 1.75rem;
  padding: 1.1rem 1.4rem;
  background: var(--paper);
  border: 1px dashed var(--cyan);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.lab-launch-note a { color: var(--cyan); font-weight: 600; }

/* Join Us */
.join-cta { margin-top: 1.8rem; }

/* Publications */
.pub-list {
  list-style: decimal;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.9rem;
  margin: 0;
}
.pub-list li { color: var(--text-muted); font-size: 0.95rem; }
.pub-list strong { color: var(--ink); }
.pub-list a { color: var(--cyan); }
.pub-more { margin-top: 1.6rem; font-size: 0.92rem; color: var(--text-muted); }
.pub-more a { color: var(--cyan); font-weight: 600; }

.placeholder-note {
  color: var(--coral);
  font-size: 0.85em;
}

/* News */
.news-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.news-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.25rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-date { font-weight: 700; color: var(--coral); font-size: 0.92rem; }
.news-item p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* Contact */
.contact-section { background: var(--ink); color: #fff; }
.contact-section .kicker { color: var(--cyan-bright); }
.contact-section h2 { color: #fff; }
.contact-section .lede-single { color: rgba(255,255,255,0.75); }
.contact-details { margin: 2rem 0 0; display: grid; gap: 1.4rem; }
.contact-details dt {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--cyan-bright);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.contact-details dd { margin: 0; font-size: 1.05rem; }
.contact-details a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); }
.contact-details .placeholder-note { color: var(--coral-soft); }

/* Footer */
.site-footer { background: var(--ink-soft); color: rgba(255,255,255,0.65); padding: 1.6rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; }
.back-to-top { color: rgba(255,255,255,0.65); text-decoration: none; }
.back-to-top:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .approach-strip, .project-grid { grid-template-columns: 1fr; }
  .pi-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    gap: 0.2rem;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease, visibility 0s linear 0.25s;
  }
  .primary-nav.open {
    max-height: 480px;
    padding-top: 0.5rem;
    padding-bottom: 1.25rem;
    visibility: visible;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }
  .primary-nav a { width: 100%; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
  .primary-nav a.nav-cta { margin-top: 0.5rem; text-align: center; }
  .news-item { grid-template-columns: 1fr; }
  .brand-logo { height: 44px; }
}
