/* =========================================================
   Roarty Lab — Redesign
   Clean · Scientific · Approachable
   ========================================================= */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --ink:        #14181f;   /* near-black text */
  --ink-soft:   #3f4753;   /* body text */
  --muted:      #6b7482;   /* captions, meta */
  --line:       #e5e7eb;   /* hairlines */
  --paper:      #ffffff;   /* white bg */
  --paper-2:    #ffffff;   /* cards */
  --sand:       #f4f6f8;   /* cool gray section tint */

  /* Accents pulled from the lab's own imaging (mTmG / organoid) */
  --magenta:    #c2185b;   /* tdTomato / membrane */
  --magenta-d:  #9c134a;
  --teal:       #0f766e;   /* GFP-adjacent cool green */
  --teal-d:     #0b544e;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(20,24,31,.04), 0 8px 30px rgba(20,24,31,.06);
  --shadow-lg:  0 24px 60px rgba(20,24,31,.12);
  --maxw:       1120px;
  --gutter:     clamp(20px, 5vw, 48px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-d); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Newsreader', Georgia, serif;
  color: var(--ink);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1.1em; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

/* ---------- Eyebrow / kicker ---------- */
.kicker {
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .95rem;
  padding: .8em 1.4em; border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: radial-gradient(circle at 30% 30%, var(--magenta), var(--magenta-d) 55%, var(--teal-d));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.brand-name { font-family: 'Newsreader', serif; font-size: 1.25rem; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.brand-sub  { display:block; font-family:'Inter',sans-serif; font-size:.68rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color: var(--muted); margin-top:-2px; }

.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: 'Inter', sans-serif; font-size: .95rem; font-weight: 500;
  color: var(--ink-soft); padding: .5rem .8rem; border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--sand); color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--magenta); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: .2s; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links a { padding: .8rem .4rem; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); background: #000; aspect-ratio: 16/10;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-family: 'Inter', sans-serif; font-size: .78rem; color: #fff;
  padding: 28px 16px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.62), transparent);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

/* ---------- Full-bleed cinematic hero ---------- */
.hero-full {
  position: relative; min-height: 82vh; display: flex; align-items: flex-end;
  overflow: hidden; color: #fff;
}
.hero-full .hero-bg { position: absolute; inset: 0; z-index: 0; background: #0b0d11; }
.hero-full .hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.hero-full .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,13,17,.28) 0%, rgba(11,13,17,.45) 45%, rgba(11,13,17,.88) 100%),
    linear-gradient(115deg, rgba(156,19,74,.42), rgba(11,84,78,.30) 70%);
}
.hero-full .hero-inner { position: relative; z-index: 1; width: 100%; padding-block: clamp(52px, 9vw, 120px); }
.hero-full .kicker { color: #ffd6e5; }
.hero-full h1 { color: #fff; max-width: 18ch; margin-bottom: .3em; text-wrap: balance; }
.hero-full .hero-lede { color: #eef0f3; max-width: 52ch; }
.hero-full .hero-cta .btn-primary { background: #fff; color: var(--ink); }
.hero-full .hero-cta .btn-primary:hover { background: var(--sand); }
.hero-full .hero-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero-full .hero-cta .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hero-credit {
  position: absolute; right: var(--gutter); bottom: 14px; z-index: 1;
  font-family: 'Inter', sans-serif; font-size: .72rem; letter-spacing: .02em;
  color: rgba(255,255,255,.78); max-width: 46ch; text-align: right;
}
@media (max-width: 640px) { .hero-credit { display: none; } }

/* ---------- Featured publications band ---------- */
.featured-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 2rem; }
.featured-head .featured-link { font-family: 'Inter', sans-serif; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.featured-head .featured-link::after { content: " →"; }

/* ---------- Featured video ---------- */
.video-frame {
  position: relative; max-width: 860px; margin-inline: auto;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); background: #0b0d11;
}
.video-frame video { display: block; width: 100%; height: auto; }
.video-frame figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-family: 'Inter', sans-serif; font-size: .82rem; color: #fff;
  padding: 34px 20px 16px;
  background: linear-gradient(to top, rgba(11,13,17,.72), transparent);
}
.video-frame figcaption b { font-weight: 600; }

/* ---------- Affiliations strip ---------- */
.affil-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sand); }
.affil-strip .affil-inner { padding: 26px 0; text-align: center; }
.affil-strip .affil-label { font-family: 'Inter', sans-serif; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.affil-strip .affil-items { font-family: 'Newsreader', serif; font-size: clamp(1rem, 2vw, 1.25rem); color: var(--ink); margin: 0; }
.affil-strip .affil-items span { color: var(--line); margin: 0 .5em; }

/* ---------- Stat strip ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sand); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.stat { background: var(--sand); padding: 30px var(--gutter); text-align: center; }
.stat b { display: block; font-family: 'Newsreader', serif; font-size: 2.1rem; color: var(--magenta); font-weight: 600; line-height: 1; }
.stat span { font-family: 'Inter', sans-serif; font-size: .82rem; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--sand); }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Feature cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; } }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .card-grid.cols-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--sand); color: var(--teal-d);
}
.card h3 { margin-bottom: .4em; }
.card p { font-size: .98rem; margin: 0; }

/* ---------- Split content ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Full-width blended figure (e.g. duct progression illustration) */
.approach-figure { margin: 2.6rem auto 0; text-align: center; max-width: 1000px; }
.approach-figure img { width: 100%; height: auto; display: block; }
.approach-figure figcaption { margin-top: .9rem; font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--muted); }

/* ---------- Image gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background:#000; }
.gallery img, .gallery video { aspect-ratio: 1/1; object-fit: cover; width: 100%; height: 100%; display: block; transition: transform .4s ease; }
.gallery figure:hover img, .gallery figure:hover video { transform: scale(1.05); }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.member { text-align: center; }
.member-photo {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px; filter: saturate(1.02);
}
.member.lead .member-photo { border: 3px solid var(--magenta); }
.member h3 { font-size: 1.2rem; margin-bottom: .1em; }
.member .role { font-family:'Inter',sans-serif; font-weight: 600; font-size: .85rem; color: var(--magenta); letter-spacing:.03em; }
.member .affil { font-size: .88rem; color: var(--muted); margin-top: .2em; }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-media { aspect-ratio: 16/10; overflow: hidden; background: #0b0d11; }
.news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-media img { transform: scale(1.04); }
.news-media.placeholder {
  background: linear-gradient(135deg, var(--magenta-d), var(--teal-d));
  display: grid; place-items: center;
}
.news-media.placeholder span {
  font-family: 'Inter', sans-serif; font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.92);
}
.news-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.news-date { font-family: 'Inter', sans-serif; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--magenta); }
.news-card h3 { font-size: 1.14rem; line-height: 1.28; margin: 0; }
.news-card p { font-size: .95rem; margin: 0; color: var(--ink-soft); }
.news-tag {
  align-self: flex-start; margin-top: .3rem; font-family: 'Inter', sans-serif;
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-d); background: var(--sand); padding: 3px 10px; border-radius: 999px;
}

/* ---------- Publications ---------- */
.pub-featured {
  background: linear-gradient(135deg, var(--teal-d), var(--teal));
  color: #eafffb; border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg);
}
.pub-featured .kicker { color: #ffd9e6; }
.pub-featured h3 { color: #fff; font-size: 1.5rem; }
.pub-featured a { color: #fff; text-decoration: underline; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 22px 0; border-bottom: 1px solid var(--line); font-size: .98rem; color: var(--ink-soft);
}
.pub-list li:first-child { padding-top: 0; }
.pub-list .authors b { color: var(--ink); }
.pub-list .venue { font-style: italic; color: var(--muted); }
.pub-list .year {
  display: inline-block; font-family:'Inter',sans-serif; font-size:.72rem; font-weight:700;
  letter-spacing:.05em; color: var(--teal-d); background: var(--sand);
  padding: 2px 10px; border-radius: 999px; margin-right: 10px; vertical-align: middle;
}

/* ---------- Resource list ---------- */
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .res-grid { grid-template-columns: 1fr; } }
.res-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.res-card h3 { font-size: 1.15rem; margin-bottom: .6em; }
.res-card ul { margin: 0; padding: 0; list-style: none; }
.res-card li { padding: 5px 0; font-size: .95rem; }
.res-card li a { display:inline-flex; align-items:center; gap:.4em; }
.res-card li a::before { content: "→"; color: var(--magenta); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta {
  background: var(--ink); color: #f4f5f7; border-radius: var(--radius);
  padding: clamp(40px, 6vw, 72px); text-align: center; box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta p { color: #c8cdd6; max-width: 52ch; margin-inline: auto; }
.cta .btn-primary { background: #fff; color: var(--ink); margin-top: 1rem; }
.cta .btn-primary:hover { background: var(--sand); }

/* ---------- Prose (interior text pages) ---------- */
.prose { max-width: 720px; }
.prose p { font-size: 1.08rem; }
.prose h2 { margin-top: 1.6em; }
.prose a { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aeb6c2; padding: 56px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #fff; font-family: 'Inter', sans-serif; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1em; font-weight: 600; }
.site-footer a { color: #aeb6c2; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 3px 0; font-size: .95rem; }
.footer-brand p { font-size: .95rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- WordPress theme additions ---------- */
.news-card h3 a { color: inherit; text-decoration: none; }
.news-card h3 a:hover { text-decoration: underline; }
.news-media a { display: block; width: 100%; height: 100%; }
.single-content { max-width: 720px; }
.single-content img { border-radius: var(--radius); margin: 1.2rem 0; height: auto; }
.single-content p { font-size: 1.08rem; }
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.page-numbers { padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 8px; font-family: 'Inter', sans-serif; font-size: .9rem; text-decoration: none; color: var(--ink); background: var(--paper-2); }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.page-numbers:hover { border-color: var(--ink); text-decoration: none; }
