/* Shin Research Collaborative · UW purple and gold.
   Colors follow the UW brand guide: Husky Purple #32006e, Spirit Gold #ffc700. */

:root {
  --purple: #32006e;
  --purple-dark: #1f0045;
  --gold: #ffc700;
  --gold-light: #ffd84d;
  --ink: #17121f;
  --muted: #4a4458;
  --on-purple: #ddd2ef;
  --tint-1: #ebe4f6;
  --tint-2: #e8e3d3;
  --tint-3: #ececf0;
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", Verdana, sans-serif;
  --gutter: clamp(16px, 4vw, 24px);
}

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: #ffffff;
}

img { max-width: 100%; }

a { color: var(--purple); }
a:hover { color: var(--purple-dark); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus { left: 12px; }

/* ---------- Purple bands (header, page banners, footer) ---------- */

.band { background: var(--purple); color: #ffffff; }
.band a { color: #ffffff; }
.band a:hover { color: var(--gold); }
.band :focus-visible { outline-color: var(--gold); }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 40px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 16px; font-weight: 700; }
.nav a { padding: 10px 0; text-decoration: none; border-bottom: 3px solid transparent; }
.nav a:hover { color: #ffffff; border-bottom-color: var(--on-purple); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }

.eyebrow { margin: 0 0 16px; font-size: 16px; font-weight: 700; color: var(--gold); }

.display {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display-xl { margin-bottom: 28px; font-size: clamp(2.8rem, 6.4vw, 5.75rem); line-height: 0.98; }
.display-lg { font-size: clamp(2.6rem, 5.6vw, 5rem); }

.lede { margin: 0; max-width: 40rem; font-size: 21px; color: var(--on-purple); text-wrap: pretty; }
.lede-sm { max-width: 44rem; font-size: 19px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.band .button { color: var(--ink); }
.band .button:hover { color: var(--ink); background: var(--gold-light); }

/* Banner with Dr. Shin's photo (home and team pages) */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px; padding-top: 72px; }
.hero-text { flex: 999 1 600px; min-width: 0; padding-bottom: 96px; }
.hero-text .eyebrow { margin-bottom: 20px; }
.hero-text .lede { margin-bottom: 36px; max-width: 36rem; }
.hero-text .lede:last-child { margin-bottom: 0; max-width: 40rem; font-size: 19px; }
.hero-photo { flex: 1 1 300px; max-width: 400px; margin: 0 0 -120px; position: relative; z-index: 1; }
.hero-photo-sm { flex-basis: 280px; max-width: 360px; margin-bottom: -96px; }
.hero-photo img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; }

.pi-name { margin: 0 0 4px; font-family: var(--display); font-size: 26px; line-height: 1.2; font-weight: 800; }
.pi-role { margin: 0 0 20px; font-size: 17px; font-weight: 700; color: var(--gold); }

/* Banner without a photo (research, publications) */
.page-hero { padding-top: 64px; padding-bottom: 88px; }

/* ---------- Sections ---------- */

.section { padding-top: 96px; padding-bottom: 96px; }
.section-tight { padding-top: 0; }
.section-title {
  margin: 0 0 40px;
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}
.section-head .section-title { margin: 0; }
.more { font-weight: 700; }

.tint-1 { background: var(--tint-1); }
.tint-2 { background: var(--tint-2); }
.tint-3 { background: var(--tint-3); }

/* Home */
.pi-line { padding-top: 56px; }
.pi-line p { margin: 0; max-width: 640px; font-size: 16px; color: var(--muted); }
.pi-line strong { color: var(--ink); }
.pi-line + .section { padding-top: 120px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.card { display: flex; flex-direction: column; gap: 14px; min-height: 340px; padding: 32px; border-radius: 20px; }
.card-label {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--purple);
}
.card h3 { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.15; font-weight: 800; }
.card-summary { flex: 1; margin: 0; font-size: 17px; }

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.person img { display: block; width: 136px; height: 136px; margin-bottom: 10px; object-fit: cover; border-radius: 50%; }
.person strong { font-size: 17px; }
.person span { font-size: 15px; color: var(--muted); }

.quote-band { background: var(--tint-1); }
.quote { max-width: 1040px; margin: 0 auto; padding: 96px var(--gutter); }
.quote blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--purple);
  text-wrap: pretty;
}
.quote figcaption { margin-top: 24px; font-size: 17px; font-weight: 700; }

.funders {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 40px;
  padding-top: 56px;
  padding-bottom: 56px;
}
.funders h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--muted); }
.funders p { flex: 1 1 640px; margin: 0; font-size: 17px; font-weight: 700; }

/* Research */
.projects { display: flex; flex-direction: column; gap: 24px; padding-top: 72px; padding-bottom: 96px; }
.project {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 24px;
  scroll-margin-top: 24px;
}
.project-main { flex: 999 1 560px; min-width: 0; }
.project-label {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--purple);
}
.project h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.project-body p { margin: 0 0 16px; }
.project-body p:last-child { margin-bottom: 0; }
.facts {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  gap: 4px;
  align-self: flex-start;
  margin: 0;
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  font-size: 16px;
}
.facts dt { font-weight: 700; }
.facts dd + dt { margin-top: 16px; }
.facts dd { margin: 0; }

/* Team */
.members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 48px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.member { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.member img { display: block; width: 160px; height: 160px; margin-bottom: 12px; object-fit: cover; border-radius: 50%; }
.member h3 { margin: 0; font-family: var(--display); font-size: 21px; line-height: 1.2; font-weight: 800; }
.member-role { margin: 0; font-size: 15px; font-weight: 700; color: var(--purple); }
.member-bio { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.after-hero.section { padding-top: 152px; }

/* Publications */
.pubs { padding-top: 48px; padding-bottom: 96px; }
.pub-year {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 56px;
  padding: 40px 0;
  border-bottom: 2px solid var(--tint-1);
}
.pub-year h2 {
  flex: 1 1 180px;
  margin: 0;
  font-family: var(--display);
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--purple);
}
.pub-year ol {
  display: flex;
  flex: 999 1 640px;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-year li { display: flex; flex-direction: column; gap: 6px; }
.pub-title {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.pub-title:hover { color: var(--purple); text-decoration: underline; }
.pub-authors { font-size: 16px; line-height: 1.5; color: var(--muted); }
.pub-authors strong { color: var(--ink); }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 15px; }
.pub-meta a { font-weight: 700; }
.pill { padding: 2px 12px; border-radius: 999px; background: var(--tint-1); font-weight: 700; }

/* ---------- Footer ---------- */

.site-footer { color: var(--on-purple); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px 64px;
  padding-top: 72px;
  padding-bottom: 48px;
}
.join { flex: 999 1 520px; }
.join .section-title { margin-bottom: 12px; color: #ffffff; }
.join p { margin: 0 0 28px; font-size: 19px; }
.address { flex: 1 1 280px; margin: 0; font-size: 15px; }

/* ---------- Narrow screens: the photo drops below the banner text ---------- */

@media (max-width: 1000px) {
  .hero { padding-top: 56px; gap: 40px; }
  .hero-text { padding-bottom: 0; }
  .hero-photo, .hero-photo-sm { flex-basis: 100%; max-width: 320px; margin-bottom: -64px; }
  .pi-line, .after-hero.section { padding-top: 104px; }
}
