/* ============================================================
   Nava Caluori — design tokens
   Signature idea: the "boundary line" — a wavering, two-tone
   line (rust ↔ teal) that stands in for the group boundaries
   the research itself is about: never quite straight, always
   drawn between two positions that shift and sometimes meet.
   ============================================================ */

:root {
  --paper: #f1ede3;
  --paper-dim: #e8e2d2;
  --ink: #201d17;
  --ink-soft: #4b4638;
  --rust: #840028;
  --rust-dim: #c97952;
  --teal: #1d6b6a;
  --teal-dim: #86c8bc;
  --rule: #cdc4ab;
  --card: #f8f5ec;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --max: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav.primary-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
nav.primary-nav li:nth-child(3) a {
  background-color: #86c8bc;
}
nav.primary-nav a:hover,
nav.primary-nav a:focus-visible,
nav.primary-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--rust);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  nav.primary-nav {
    display: none;
    width: 100%;
  }
  nav.primary-nav.open { display: block; }
  nav.primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: 1rem;
  }
  nav.primary-nav li { border-top: 1px solid var(--rule); }
  nav.primary-nav a {
    display: block;
    padding: 0.85rem 0.1rem;
  }
  .site-header .wrap { flex-wrap: wrap; }
}

/* ---------- boundary divider ---------- */
.boundary {
  width: 100%;
  height: 20px;
  display: block;
  margin: 0;
}
.boundary path { fill: none; stroke-width: 2.5; }

.boundary--section {
  margin: 3.5rem 0;
}

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rust);
  margin: 0 0 0.75rem;
}

/* ---------- hero (home) ---------- */
.hero {
  padding: 3.5rem 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 17rem 1fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 780px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.portrait-frame {
  position: relative;
  width: 100%;
}
.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border: 1px solid var(--ink);
}
.portrait-frame::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--rust);
  z-index: 1;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 28px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--teal);
  z-index: 0;
}

h1.display-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 0.35rem;
}

.role-line {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
}

.bio p {
  max-width: 42rem;
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
}

.callout {
  margin-top: 1.6rem;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--teal);
  background: var(--card);
  max-width: 42rem;
  font-size: 0.98rem;
}

.contact-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.contact-row a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
}
.contact-row a:hover { border-bottom-color: var(--rust); color: var(--rust); }

/* ---------- research page ---------- */
.page-head {
  padding: 3.25rem 0 1rem;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  margin: 0;
}
.page-head p.lede {
  max-width: 40rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

.pub-list {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.pub {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 620px) {
  .pub { grid-template-columns: 1fr; gap: 0.4rem; }
}

.pub-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal);
  padding-top: 0.15rem;
}
.pub-link a {
  border-bottom: 1px solid var(--teal-dim);
}
.pub-link a:hover {
  color: var(--rust);
  border-bottom-color: var(--rust);
}

.pub-body p { margin: 0; }

.pub-body .pub-title a {
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pub-body .pub-title a:hover {
  border-bottom-color: var(--rust);
  color: var(--rust);
}

.pub-body .pub-authors { font-size: 0.98rem; }
.pub-body .pub-journal {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.pub-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: -1.5rem 0 3rem;
}

/* ---------- C3 lab page ---------- */
.lab-hero {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.lab-hero img {
  width: 100%;
  max-width: 640px;
  height: auto;
}
.lab-hero::after {
  content: "";
  position: absolute;
  inset: 0;
}
.lab-hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 1.75rem 2.2rem;
  max-width: var(--max);
  margin: 0 auto;
  color: var(--paper);
}
.lab-hero-text .initials {
  font-family: var(--font-mono);
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  text-transform: uppercase;
  opacity: 0.85;
}
.lab-hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0.3rem 0 0;
}

.lab-intro {
  padding: 2.75rem 0 0.5rem;
  font-size: 1.05rem;
}

.questions {
  display: grid;
  gap: 1.5rem;
  padding: 1rem 0 3rem;
}

.question-card {
  background: var(--card);
  border-left: 4px solid var(--rust);
  padding: 1.6rem 1.8rem;
}
.question-card:nth-child(2) { border-left-color: var(--teal); }
.question-card:nth-child(3) { border-left-color: var(--rust-dim); }

.question-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0 0 0.6rem;
}
.question-card p { margin: 0; color: var(--ink-soft); }

.join-box {
  background: var(--ink);
  color: var(--paper);
  padding: 2.25rem 2rem;
  margin-bottom: 3.5rem;
}
.join-box h2 {
  font-family: var(--font-display);
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
}
.join-box p { margin: 0 0 0.4rem; color: #d8d3c4; }
.join-box a.deadline-link {
  color: var(--rust-dim);
  border-bottom: 1px solid var(--rust-dim);
}
.join-box a.deadline-link:hover { color: var(--paper); border-bottom-color: var(--paper); }

/* ---------- footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer.site-footer a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
footer.site-footer a:hover { color: var(--rust); border-bottom-color: var(--rust); }
footer .foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
footer .copyright { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
