/* ═══════════════════════════════════════════════════════════
   Daniel Capurro — design tokens
   Ground: paper. Ink: near-black. Signal: monitor teal.
   Type: Archivo (display) / Source Serif 4 (body) / IBM Plex Mono (data)
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper:        #faf9f6;
  --paper-raised: #ffffff;
  --paper-sunk:   #f1f0ea;

  --ink:          #14171a;
  --ink-soft:     #4a5158;
  --ink-faint:    #8b929a;

  --rule:         #dedcd3;
  --rule-strong:  #c7c4b8;

  --signal:       #0b7285;
  --signal-deep:  #075463;
  --signal-wash:  rgba(11, 114, 133, 0.07);
  --alarm:        #b45309;
  --alarm-wash:   rgba(180, 83, 9, 0.08);

  --nav-height:   64px;
  --radius:       3px;

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure:      62ch;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--signal); color: var(--paper); }

a { color: var(--signal); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--signal);
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero-band {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

/* Ambient particle field — sits behind the hero, never in front of type.
   Masked so it thins out over the text column and fades before the bottom
   rule, leaving the field strongest in the open space beside the portrait. */
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image:
    linear-gradient(90deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.10) 34%, #000 70%, #000 100%),
    linear-gradient(180deg, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.10) 34%, #000 70%, #000 100%),
    linear-gradient(180deg, #000 78%, transparent 100%);
  mask-composite: intersect;
}

.hero-band .container {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 5rem 0 5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 0.35rem;
}

.hero-creds {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
  max-width: 40ch;
}

/* Linked fellowships stay in the credential line's own voice — four teal
   words here would shout. They only colour up on hover. */
.hero-creds a {
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 -1px 0 0 var(--rule-strong);
  transition: color 0.18s ease, box-shadow 0.18s ease;
}

.hero-creds a:hover {
  color: var(--signal-deep);
  box-shadow: inset 0 -1px 0 0 var(--signal);
}

.hero-role {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.hero-affil {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-bottom: 1.75rem;
}

.hero-text p.lede {
  font-size: 1.06rem;
  line-height: 1.62;
  color: var(--ink);
  max-width: var(--measure);
  margin-bottom: 1rem;
}

.hero-text p {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 1rem;
}

.hero-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  align-items: center;
}

/* ── BUTTONS / INLINE ACTIONS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.5rem 0;
  transition: color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  color: var(--signal-deep);
  box-shadow: inset 0 -1px 0 0 var(--signal);
}
.btn-primary:hover { color: var(--ink); box-shadow: inset 0 -2px 0 0 var(--ink); }

.btn-outline {
  color: var(--ink-faint);
  box-shadow: inset 0 -1px 0 0 var(--rule-strong);
}
.btn-outline:hover { color: var(--ink); box-shadow: inset 0 -2px 0 0 var(--ink); }

/* ── HEADSHOT ────────────────────────────────────────────── */
.headshot-wrap { flex-shrink: 0; }

.headshot {
  width: 176px;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  filter: grayscale(100%) contrast(1.04);
  transition: filter 0.5s ease;
}
.headshot:hover { filter: grayscale(0%) contrast(1); }

/* ── SECTION HEADERS ─────────────────────────────────────── */
.section-header {
  padding: 4.5rem 0 1.5rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.section-header p {
  color: var(--ink-soft);
  margin-top: 0.6rem;
  font-size: 0.98rem;
  max-width: var(--measure);
}

/* ── EYEBROW ─────────────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--signal-deep);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--signal);
  flex-shrink: 0;
}

/* ── STATUS CHIPS ────────────────────────────────────────── */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

.chip-active { color: var(--signal-deep); background: var(--signal-wash); }

/* ── GROUP LABELS ────────────────────────────────────────── */
.group-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  padding-bottom: 0.6rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.group-label .count { color: var(--rule-strong); }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--rule-strong);
  box-shadow: 0 1px 0 0 var(--signal) inset, 0 8px 24px -20px rgba(20, 23, 26, 0.5);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ── GRIDS ───────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* ── HOME: RESEARCH FOCUS ────────────────────────────────── */
.focus-section { padding: 4rem 0 5rem; }

.focus-card .focus-index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--signal);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ── PROJECTS ────────────────────────────────────────────── */
.projects-section { padding-bottom: 4rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  color: var(--ink-faint);
  background: var(--paper-sunk);
  border-radius: 2px;
}

/* ── PROJECT RECORD ──────────────────────────────────────── */
.proj-list { border-top: 1px solid var(--ink); margin-bottom: 3.5rem; }

.proj-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0.75rem 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s ease;
}

.proj-row:hover { background: var(--paper-raised); }

.proj-years {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.proj-row:hover .proj-years { color: var(--signal); }

.proj-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  color: var(--ink);
  max-width: 62ch;
}

.proj-status {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  white-space: nowrap;
}

.proj-status.is-active    { color: var(--signal-deep); background: var(--signal-wash); }
.proj-status.is-completed { color: var(--ink-faint); background: var(--paper-sunk); }

.proj-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-bottom: 5rem;
}

.proj-types b {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── PUBLICATIONS ────────────────────────────────────────── */
.scholar-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--signal);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.5rem 1.75rem;
  margin-bottom: 3.5rem;
}

.scholar-banner h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-bottom: 0.2rem;
}

.scholar-banner p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 46ch;
}

.pub-list { border-top: 1px solid var(--ink); }

.pub-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0.75rem 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s ease;
}

.pub-row:hover { background: var(--paper-raised); }

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.pub-row:hover .pub-year { color: var(--signal); }

.pub-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.35rem;
  max-width: 64ch;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
  max-width: 70ch;
}

.pub-authors strong { color: var(--ink); font-weight: 600; }

.pub-venue {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
}

.pub-venue.in-press { color: var(--alarm); background: var(--alarm-wash); padding: 0.1rem 0.35rem; border-radius: 2px; }

.pub-footnote {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin: 2.5rem 0 5rem;
}

.pub-footnote a { color: var(--signal-deep); }

/* ── PEOPLE ──────────────────────────────────────────────── */
.person-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
}

.person-initials {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--signal-wash);
  color: var(--signal-deep);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.person-card h3 {
  font-size: 0.97rem;
  margin-bottom: 0.15rem;
}

.person-role {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}

.person-topic {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.person-years {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  margin-top: 0.6rem;
}

.alumni .person-initials { background: var(--paper-sunk); color: var(--ink-faint); }

.alumni-list {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 2.1;
  color: var(--ink-soft);
  margin-bottom: 5rem;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 2.25rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  text-transform: uppercase;
  text-align: center;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  nav { padding: 0 1.25rem; }
  .container { padding: 0 1.25rem; }

  /* The brand is redundant here — the hero carries the name, and "Home" is
     already in the links. Dropping it lets the four links fit without
     forcing the page wider than the viewport. */
  .nav-brand { display: none; }
  .nav-links { flex: 1; justify-content: space-between; gap: 0.75rem; }
  .nav-links a { font-size: 0.63rem; letter-spacing: 0.05em; }

  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 3.5rem; }
  .headshot-wrap { order: -1; }
  .headshot { width: 120px; height: 150px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .pub-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .proj-row { grid-template-columns: 1fr; gap: 0.5rem; justify-items: start; }
  .scholar-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
