/* ============================================================
   Noor Precision Neuromodulation (NPN) Lab — site stylesheet
   ============================================================ */

:root {
  --navy: #1b2a4a;
  --crimson: #9d2235;
  --pink: #e63950;
  --cream: #faf8f6;
  --paper: #ffffff;
  --text: #23262b;
  --text-muted: #5b6270;
  --border: #e4e1dc;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

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

a { color: var(--crimson); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.muted { color: var(--text-muted); }

/* ---------- header ---------- */

header.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 40px;
  width: auto;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
}

nav.main-nav a:hover { color: var(--crimson); text-decoration: none; }

nav.main-nav a.active { color: var(--crimson); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--navy);
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  nav.main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 12px;
  }
  nav.main-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--cream) 100%);
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}

.hero .wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text { flex: 1 1 380px; }

.hero-text h1 { margin-bottom: 8px; }

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.2em;
}

.hero-mark {
  flex: 0 0 220px;
  max-width: 220px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  background: var(--crimson);
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn:hover { background: var(--navy); text-decoration: none; color: #fff; }

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn-outline:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* ---------- page header (non-home) ---------- */

.page-header {
  padding: 40px 0 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.page-header p { color: var(--text-muted); }

/* ---------- sections ---------- */

section { padding: 40px 0; }

.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* research areas on home */

.area-list { list-style: none; padding: 0; margin: 20px 0 0; }
.area-list li + li { margin-top: 10px; }
.area-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.area-list a::after { content: "\2192"; color: var(--crimson); }
.area-list a:hover { border-color: var(--crimson); color: var(--crimson); }

/* keep linked research sections clear of the sticky header */
.theme { scroll-margin-top: 90px; }

.areas-row {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 8px;
}

.areas-col { flex: 1 1 320px; }

.areas-figure { flex: 1 1 300px; max-width: 420px; margin: 0 auto; }
.areas-figure figure { margin: 0; }
.areas-figure img,
.areas-figure video { width: 100%; display: block; }

.approach-diagram {
  margin-top: 20px;   /* aligns top with the area-list links on the left */
}
.approach-row-top {
  display: flex;
  gap: 14px;
}
.approach-row-bottom {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.approach-box {
  border-radius: 18px;
  border: 1.5px solid;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 12px;
  flex: 1;
}
.approach-row-bottom .approach-box { flex: none; width: calc(50% - 7px); }
.approach-human { background: #dce3ee; border-color: var(--navy); }
.approach-animal { background: #f3dce0; border-color: var(--crimson); }
.approach-model { background: #f2e2c9; border-color: #a5651f; }

@media (max-width: 480px) {
  .approach-box { font-size: 0.82rem; min-height: 96px; }
}

/* photo + caption */

figure { margin: 0 0 1.5em; }

figure.size-full img,
figure.size-full video { width: 100%; }

figure.size-medium { max-width: 640px; }
figure.size-medium img,
figure.size-medium video { width: 100%; margin: 0 auto; }

figure.size-small { max-width: 380px; }
figure.size-small img,
figure.size-small video { width: 100%; margin: 0 auto; }

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.photo-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.photo-row figure { flex: 1 1 320px; }

/* research themes */

.theme {
  border-left: 3px solid var(--crimson);
  padding-left: 20px;
  margin-bottom: 32px;
}

.theme h3 { margin-top: 0; }

/* two figures side by side at equal height (flex-grow = image aspect ratio) */

.figure-pair {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 1.5em;
}
.figure-pair figure { margin: 0; min-width: 0; }
.figure-pair img { width: 100%; display: block; }
.figure-pair .fp-diagram { flex: 2.439 1 0; }   /* 1439 x 590 */
.figure-pair .fp-photo   { flex: 1.549 1 0; }   /* 1600 x 1033 */

@media (max-width: 720px) {
  .figure-pair { flex-direction: column; }
}

/* text-left / media-right layout for themes with a video or figure */

.theme-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 8px;
}

.theme-row .theme-text { flex: 1 1 320px; }
.theme-row .theme-text p:last-child { margin-bottom: 0; }

.theme-row .theme-media { flex: 1 1 280px; max-width: 340px; margin: 0 auto; }
.theme-row .theme-media video,
.theme-row .theme-media img { width: 100%; display: block; }
.theme-row .theme-media figure { margin: 0; }

.pub-callout {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin-top: 14px;
}
.pub-callout h4 { margin: 0 0 8px; font-size: 1rem; }
.pub-callout p { font-size: 0.92rem; }
.pub-callout p.citation { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.flow span.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
}

.flow span.arrow { color: var(--crimson); font-weight: 700; }

/* publications */

.pub-list {
  list-style: none;
  margin: 0 0 2em;
  padding: 0;
  counter-reset: pub;
}

.pub-list li {
  counter-increment: pub;
  padding: 12px 0 12px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.96rem;
}

.pub-list li::before {
  content: counter(pub) ".";
  position: absolute;
  left: 0;
  color: var(--crimson);
  font-weight: 700;
}

.pub-list li .authors strong { color: var(--navy); }

.cover-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.cover-row figure { flex: 0 0 180px; }
.cover-row img { border: 1px solid var(--border); border-radius: 4px; }

/* team */

.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.member-grid li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.member-grid li:last-child { border-bottom: none; }

.member-grid .name { font-weight: 700; }

.member-grid .role { color: var(--text-muted); font-size: 0.9rem; }

.pi-block {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.pi-photo {
  flex: 0 0 150px;
  width: 150px;
  height: 225px;
  border-radius: 10px;
  background: var(--navy);
  overflow: hidden;
}

.pi-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.pi-info h3 {
  margin-top: 0;
}

.pi-info { flex: 1 1 380px; }

.pi-info ul { padding-left: 20px; margin: 0.5em 0; }
.pi-info li { margin-bottom: 4px; }

/* footer */

footer.site-footer {
  background: var(--navy);
  color: #cfd6e4;
  padding: 32px 0;
  margin-top: 40px;
}

footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

footer.site-footer a { color: #fff; }

footer.site-footer .foot-logo {
  background: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  display: inline-block;
}

footer.site-footer .foot-logo img { height: 46px; }

footer.site-footer small { color: #9aa4ba; }
