/* ==========================================================================
   Stanford AO — shared stylesheet for content pages (About, Resources, Apply)
   The home page (index.html) and summit microsite keep their own inline styles.
   ========================================================================== */

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

:root {
  --bg: #f4f1eb;
  --ink: #0f0e0b;
  --accent: #c8401a;
  --muted: #9e9b93;
  --border: #d6d2c8;
  --card: #faf9f6;
  --prose: var(--ink);
  --mono: 'DM Mono', monospace;
  --serif: 'DM Serif Display', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
}

/* ── Layout ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 120px;
}

/* ── Top bar / nav ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.7s ease forwards;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.wordmark-stanford {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark-stanford:hover { color: var(--accent); }

.wordmark-sep {
  width: 24px;
  height: 1px;
  background: var(--border);
  align-self: center;
}

.wordmark-ao {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.nav a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--accent); }
.nav a.nav-cta { color: var(--accent); }
.nav a.nav-cta:hover { color: var(--ink); }

/* ── Page head ── */
.page-head {
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.7s 0.1s ease forwards;
}
.page-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
h1.page-title {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 24px;
}
h1.page-title em { font-style: italic; color: var(--accent); }

.lede {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 300;
  color: var(--prose);
  max-width: 620px;
  line-height: 1.8;
}
.lede a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}
.lede a:hover { border-bottom-color: var(--ink); color: var(--ink); }

/* ── Divider ── */
.rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ── Content sections ── */
.section {
  margin: 52px 0;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.7s 0.2s ease forwards;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.section-sub {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 28px 0 12px;
}

.prose p {
  font-size: 14px;
  font-weight: 300;
  color: var(--prose);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 620px;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}
.prose a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Cards / parts ── */
.parts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
}
.part {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 2px;
  padding: 24px;
}
.part h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 10px;
}
.part p {
  font-size: 13px;
  font-weight: 300;
  color: var(--prose);
  line-height: 1.75;
  margin: 0;
}

/* ── Resource cards (with action link) ── */
.res-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 2px;
  padding: 26px;
  margin-bottom: 16px;
}
.res-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
}
.res-card p {
  font-size: 13px;
  font-weight: 300;
  color: var(--prose);
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 620px;
}
.res-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.res-note {
  font-size: 12px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.7;
  margin-top: 14px;
}

/* ── People grid ── */
.people {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 28px;
}
@media (min-width: 620px) {
  .people { grid-template-columns: 1fr 1fr; }
}
.person {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 2px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.person:hover {
  border-color: var(--ink);
  background: var(--bg);
}
.person.is-open {
  border-color: var(--ink);
}
.person-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}
.person-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}
.person-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.2;
}
.person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.person-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.person-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
  transition: color 0.15s ease, background 0.15s ease;
}
.person-link:hover {
  color: var(--accent);
  background: var(--card);
}
.person-link svg {
  width: 14px;
  height: 14px;
  display: block;
}
.person-role {
  font-size: 12px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
}
.person-bio-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.person.is-open .person-bio-wrap {
  grid-template-rows: 1fr;
}
.person-bio {
  font-size: 12px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.65;
  overflow: hidden;
  margin: 0;
  padding-top: 0;
}
.person.is-open .person-bio {
  padding-top: 8px;
}

/* ── Host / partner lockups ── */
.hosts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-top: 24px;
}
.host {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.host img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.host .host-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--prose);
}

/* ── Checklist (eligibility) ── */
.checklist {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  max-width: 620px;
}
.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 300;
  color: var(--prose);
  line-height: 1.7;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 500;
}

/* ── Numbered sections (application) ── */
.appsec {
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
.appsec:last-of-type { border-bottom: 1px solid var(--border); }
.appsec h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  margin-bottom: 10px;
}
.appsec h3 .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}
.appsec p {
  font-size: 13px;
  font-weight: 300;
  color: var(--prose);
  line-height: 1.75;
  margin-bottom: 10px;
  max-width: 620px;
}
.appsec p:last-child { margin-bottom: 0; }
.appsec em { color: var(--ink); font-style: italic; }

/* ── Timeline ── */
.timeline {
  border-top: 1px solid var(--border);
  margin: 8px 0 0;
  max-width: 620px;
}
.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-label { font-size: 13px; font-weight: 300; color: var(--ink); }
.timeline-date {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}

.callout {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 20px 0;
  font-size: 13px;
  font-weight: 300;
  color: var(--prose);
  line-height: 1.75;
  max-width: 620px;
}

.note {
  font-size: 12px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.75;
  max-width: 620px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  border-radius: 2px;
  padding: 13px 24px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  border: 1px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  border-style: dashed;
  cursor: not-allowed;
  pointer-events: none;
}

.link-arrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.link-arrow:hover { color: var(--ink); border-bottom-color: var(--ink); }
.link-arrow.muted {
  color: var(--muted);
  border-bottom-color: var(--border);
  cursor: default;
  pointer-events: none;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ── Footer ── */
footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
footer span {
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.05em;
}
footer a {
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.05em;
  text-decoration: none;
}
footer a:hover { color: var(--accent); }

/* ── Animation ── */
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .topbar, .page-head, .section { animation: none; opacity: 1; transform: none; }
}
