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

:root {
  --stanford-red: #8c1515;
  --stanford-dark: #6b1010;
  --dark: #2e2d29;
  --light: #f4f4f2;
  --text: #1c1c1c;
  --muted: #585754;
  --border: #d0cfc8;
  --max-w: 900px;
  --accent: #007c7a;
}

body {
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: #fff;
}

/* ── Header ── */
.site-header { background: var(--stanford-red); color: #fff; padding: 0 1.5rem; }
.site-header-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0; flex-wrap: wrap; gap: .5rem;
}
.site-title { font-size: 1.2rem; font-weight: 700; letter-spacing: .02em; }
.site-title a { color: #fff; text-decoration: none; }
.site-title a:hover { opacity: .85; }
.site-title small { font-weight: 400; font-size: .75rem; opacity: .8; display: block; }

nav { display: flex; flex-wrap: wrap; gap: .15rem; }
nav a {
  color: rgba(255,255,255,.9); text-decoration: none;
  font-size: .85rem; padding: .3rem .55rem;
  border-radius: 3px; transition: background .15s;
}
nav a:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: .82rem; color: var(--muted); margin-bottom: 1.2rem;
  font-family: Arial, sans-serif;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--stanford-red); text-decoration: underline; }
.breadcrumb .sep { margin: 0 .3rem; }

/* ── Main ── */
main { max-width: var(--max-w); margin: 2rem auto; padding: 0 1.5rem; }
article { }

h1 {
  font-size: 1.7rem; color: var(--stanford-red);
  border-bottom: 2px solid var(--stanford-red);
  padding-bottom: .4rem; margin-bottom: .6rem; line-height: 1.3;
}
.lead {
  font-size: 1.05rem; line-height: 1.7; color: #444;
  margin-bottom: 1.5rem; border-left: 3px solid var(--stanford-red);
  padding-left: 1rem;
}

h2 {
  font-size: 1.35rem; color: var(--dark);
  margin: 2rem 0 .6rem; padding-bottom: .3rem;
  border-bottom: 1px solid var(--border);
}
h3 {
  font-size: 1.1rem; color: var(--dark);
  margin: 1.5rem 0 .4rem;
}
h4 { font-size: .95rem; color: var(--muted); margin: 1rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }

p { margin-bottom: 1rem; }
a { color: var(--stanford-red); }
a:hover { color: var(--stanford-dark); }

ul, ol { padding-left: 1.6rem; margin-bottom: 1rem; }
li { margin-bottom: .35rem; }

/* ── Member cards ── */
.member-card {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 1.25rem 1.5rem; margin-bottom: 1rem;
  background: #fafaf9;
}
.member-card h3 { margin-top: 0; color: var(--stanford-red); border: none; }
.member-card .meta { font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.member-card p { margin-bottom: .4rem; font-size: .93rem; }
.member-card p:last-child { margin-bottom: 0; }

/* ── Tech cards ── */
.tech-section { margin-bottom: 2.5rem; }
.tech-section h2 { color: var(--stanford-red); }

/* ── Resource cards ── */
.resource-card {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 1.25rem 1.5rem; margin-bottom: 1.2rem;
  background: #fafaf9;
}
.resource-card h3 { margin-top: 0; color: var(--stanford-red); }
.resource-card .citation { font-size: .88rem; color: var(--muted); }
.resource-links { list-style: none; padding-left: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.resource-links li a {
  display: inline-block; font-size: .82rem; padding: .25rem .7rem;
  border: 1px solid var(--stanford-red); border-radius: 3px;
  text-decoration: none; color: var(--stanford-red);
  transition: background .15s, color .15s;
}
.resource-links li a:hover { background: var(--stanford-red); color: #fff; }

/* ── Internal link cards ── */
.link-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.link-card {
  display: block; padding: 1.1rem 1.3rem;
  border: 1px solid var(--border); border-radius: 6px;
  text-decoration: none; color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.link-card:hover { border-color: var(--stanford-red); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.link-card h3 { font-size: .95rem; color: var(--stanford-red); margin: 0 0 .4rem; }
.link-card p { font-size: .85rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* ── Footer ── */
footer {
  margin-top: 4rem; padding: 2rem 1.5rem;
  background: var(--dark); color: rgba(255,255,255,.7);
  font-size: .82rem; text-align: center;
}
footer a { color: rgba(255,255,255,.7); }
footer .footer-inner { max-width: var(--max-w); margin: 0 auto; }
footer .footer-nav { margin-bottom: .5rem; }
footer .footer-nav a { margin: 0 .5rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  h1 { font-size: 1.35rem; }
  .site-header-inner { flex-direction: column; align-items: flex-start; }
  .link-grid { grid-template-columns: 1fr; }
}
