/* ============================================
   RAAIN Lab — Design System
   Palette drawn from the lab logo (blooming brain
   illustration): sage/leaf green, warm gold/amber,
   dusty plum and blush from the flowers.
   ============================================ */

:root {
  /* Palette */
  --forest: #4c7a5b;
  --forest-dark: #33513c;
  --forest-light: #6f9c7c;
  --moss: #8ea77c;
  --clay: #dd9736;
  --clay-dark: #b06f1c;
  --plum: #7c5ba0;
  --plum-dark: #5c4179;
  --blush: #d98a9a;
  --blush-dark: #b45f72;
  --cream: #faf6ee;
  --cream-warm: #f5ede0;
  --paper: #fffdf8;
  --ink: #2b2a25;
  --ink-soft: #55534a;
  --line: #e3dac6;
  --gold: #eab63e;

  --font-head: "Fraunces", Georgia, "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 4px 18px rgba(43, 42, 37, 0.08);
  --shadow-lg: 0 12px 40px rgba(43, 42, 37, 0.14);
  --max-w: 1120px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--forest-dark);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em 0; }

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--clay-dark); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-bottom: 0.7em;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary {
  background: var(--forest);
  color: #fff;
}
.btn-primary:hover { background: var(--forest-dark); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest);
}
.btn-outline:hover { background: var(--forest); color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--forest-dark);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--forest-dark);
}
.brand-text span { font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.03em; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.nav-links a:hover { background: var(--cream-warm); color: var(--forest-dark); }
.nav-links a.active { color: var(--forest-dark); background: var(--cream-warm); font-weight: 700; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--forest-dark);
  margin: 5px 0;
  transition: 0.2s;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 100%);
  padding: 76px 0 96px;
}
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}
.hero-art {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-art.logo-art {
  aspect-ratio: 3/4;
  background: radial-gradient(circle at 30% 20%, #fdf3e9 0%, var(--cream-warm) 45%, #ecdfe9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6%;
}
.hero-art.logo-art img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  filter: drop-shadow(0 10px 24px rgba(43,42,37,0.14));
}
@media (max-width: 860px) {
  .hero-art.logo-art { aspect-ratio: 4/3; max-width: 340px; margin: 0 auto; }
}

.hero h1 { margin-bottom: 0.35em; }
.hero-sub { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 1.6em; max-width: 52ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Decorative nature scene (pure CSS/SVG, no external images) */
.scene {
  width: 100%;
  height: 100%;
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 68ch; margin-bottom: 40px; }

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
  border-radius: 10px;
  padding: 20px 24px;
}
.value-card h4 { color: var(--forest-dark); margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cream-warm);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon-badge svg { width: 24px; height: 24px; }

/* ---------- People ---------- */
.person-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.person-photo {
  aspect-ratio: 1;
  width: 100%;
  background: linear-gradient(135deg, var(--moss) 0%, var(--forest) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo .initials {
  font-family: var(--font-head);
  font-size: 3rem;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
}
.person-body { padding: 22px; }
.person-role { font-size: 0.85rem; color: var(--clay-dark); font-weight: 600; margin-bottom: 8px; }
.person-body p:last-child { margin-bottom: 0; }
.person-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 10px; }

.alumni-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}
@media (max-width: 700px) { .alumni-list { grid-template-columns: 1fr; } }
.alumni-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.alumni-item h4 { margin-bottom: 4px; }
.alumni-item .person-role { margin-bottom: 6px; }
.alumni-item p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 4px; }

/* ---------- Publications ---------- */
.pub-year {
  font-family: var(--font-head);
  color: var(--clay-dark);
  font-size: 1.4rem;
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 2px solid var(--line);
}
.pub-year:first-of-type { border-top: none; margin-top: 0; }
.pub-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
}
.pub-item:last-child { border-bottom: none; }
.pub-num {
  color: var(--moss);
  font-weight: 700;
  font-family: var(--font-head);
  flex-shrink: 0;
  width: 28px;
}
.pub-text .pub-title { font-weight: 600; color: var(--ink); }
.pub-text .pub-authors { color: var(--ink-soft); font-size: 0.95rem; }
.pub-text .pub-venue { color: var(--forest); font-size: 0.92rem; font-style: italic; }
.pub-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--cream-warm);
  color: var(--clay-dark);
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
}

/* ---------- Timeline (News) ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--clay);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--clay);
}
.tl-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-bottom: 4px;
}
.tl-item h4 { margin-bottom: 6px; }
.tl-item p { color: var(--ink-soft); margin-bottom: 0; }
.tl-item a { font-weight: 600; }

/* ---------- Quote / CTA banner ---------- */
.banner {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 100%);
  color: #fff;
  border-radius: 22px;
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.banner h2 { color: #fff; }
.banner p { color: rgba(255,255,255,0.82); }
.banner .btn-primary { background: #fff; color: var(--forest-dark); }
.banner .btn-primary:hover { background: var(--cream-warm); }

/* ---------- Lists (checkmarks) ---------- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.check-list li svg {
  width: 22px; height: 22px; flex-shrink: 0; color: var(--moss); margin-top: 2px;
}

/* ---------- Contact ---------- */
.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-card .icon-badge { margin-bottom: 0; }
.contact-card h4 { margin-bottom: 4px; }
.contact-card p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 32px; height: 32px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.footer-brand h4 { margin-bottom: 0; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}

/* ---------- Page header (interior pages) ---------- */
.page-hero {
  background: var(--cream-warm);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero p { max-width: 62ch; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--forest); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: grid; gap: 18px; }
.note {
  background: var(--cream-warm);
  border-left: 4px solid var(--clay);
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
