/* ══════════════════════════════════════════════
   Data Science of the Mind — Shared Styles
   ══════════════════════════════════════════════ */

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

:root {
  --red: #cc0000;
  --dark: #1a1a1a;
  --mid: #444;
  --light: #767676;
  --bg: #fafaf8;
  --card-bg: #fff;
  --border: #e2e0dc;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

body {
  font-family: var(--sans);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-brand img {
  height: 80px; /* logo */
  width: auto;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--red); }

/* ── PAGE HEADER ── */
.page-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 2rem 1rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-header p {
  margin-top: 0.75rem;
  color: var(--light);
  max-width: 560px;
}
.page-header a { color: var(--red); }

/* ── HERO (index) ── */
.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 2rem 2rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--dark);
  max-width: 700px;
}
.hero h1 em {
  font-style: italic;
  color: var(--red);
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--light);
  /* max-width: 600px; */
  line-height: 1.7;
}
.hero-affiliation {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-affiliation .dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── SECTIONS ── */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 2rem 1rem;
}
.section--hero-spacing { padding: 3rem 2rem; }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.section-label--no-border {
  border-bottom: none;
  padding-bottom: 0;
}

/* ── RESEARCH GRID (index) ── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.research-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.research-card:hover {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(204,0,0,0.06);
}
.research-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}
.research-card p {
  font-size: 0.88rem;
  color: var(--light);
  line-height: 1.6;
}

/* ── PUBLICATION LIST (shared by index & publications) ── */
.featured-pubs { margin-top: 1rem; }
.pub-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: baseline;
}
.pub-item:last-child { border-bottom: none; }

.pub-list { list-style: none; }
.pub-entry {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.25rem;
  align-items: baseline;
}
.pub-entry:last-child { border-bottom: none; }

.pub-venue {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  width: 100px;
  text-align: right;
  line-height: 1.8;
}
.pub-info h4,
.pub-body h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}
.pub-info .authors,
.pub-body .authors {
  font-size: 0.84rem;
  color: var(--light);
  margin-top: 0.2rem;
}
.pub-body .pub-links {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.85rem;
}
.pub-body .pub-links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.15s;
}
.pub-body .pub-links a:hover { color: var(--red); }

.view-all-link {
  margin-top: 1.5rem;
  display: inline-block;
  color: var(--red);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}

/* ── PI CARD (people) ── */
.pi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.25rem;
  display: flex;
  gap: 2.25rem;
  align-items: flex-start;
}
.pi-portrait {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e6e2;
}
.portrait-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8e6e2 0%, #d4d1cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 600;
  color: #a09e9a;
}
.pi-info h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
}
.pi-info .title {
  font-size: 0.9rem;
  color: var(--red);
  font-weight: 500;
  margin-top: 0.2rem;
}
.pi-info .bio {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.7;
}
.pi-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.25rem;
}
.pi-links a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.pi-links a:hover { color: var(--red); }

/* ── STUDENT GRID (people) ── */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.student-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  text-align: center;
  transition: border-color 0.2s;
}
.student-card:hover { border-color: var(--red); }
.student-portrait {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  background: #e8e6e2;
}
.student-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #e8e6e2 0%, #d4d1cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: #a09e9a;
}
.student-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}
.student-card .role {
  font-size: 0.82rem;
  color: var(--red);
  font-weight: 500;
  margin-top: 0.15rem;
}
.student-card .interests {
  font-size: 0.84rem;
  color: var(--light);
  margin-top: 0.6rem;
  line-height: 1.55;
}
.student-card .student-links {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.student-card .student-links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s;
}
.student-card .student-links a:hover { color: var(--red); }

/* ── FOOTER ── */
footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--light);
  flex-wrap: wrap;
  gap: 1rem;
}
footer a { color: var(--mid); text-decoration: none; }
footer a:hover { color: var(--red); }
.footer-links { display: flex; gap: 1.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav {
    padding: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  .nav-brand {
    width: 100%;
    justify-content: center;
  }
  .nav-brand img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100px;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
  }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .page-header { padding: 2rem 1.25rem 0.5rem; }
  .section { padding: 1.5rem 1.25rem 1rem; }
  .pub-item { flex-direction: column; gap: 0.25rem; }
  .pub-venue { text-align: left; width: auto; }
  .pub-entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .pi-card { flex-direction: column; align-items: center; text-align: center; }
  .pi-links { justify-content: center; }
  footer { padding: 2rem 1.25rem; }
}
