/* UCSD Phonetics Lab — site stylesheet (2026 redesign)
   One stylesheet for every page. Fonts: Gentium Book Plus (SIL, built for IPA)
   for text and transcriptions; Work Sans for navigation and headings. */

/* Lab IPA: subset of Charis SIL (OFL, see fonts/OFL.txt). Used for transcriptions
   because it joins Chao tone letters (˧˥, ˨˩ ...) into single contour glyphs. */
@font-face {
  font-family: "Lab IPA";
  src: url("../fonts/lab-ipa.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #182b49;      /* UCSD navy: masthead, headings */
  --gold: #ffcd00;      /* UCSD gold: waveform, focus, small accents only */
  --ink: #23262d;       /* body text */
  --slate: #5b6b82;     /* secondary text, meta */
  --rule: #d9dee6;      /* separators */
  --paper: #f7f8fa;     /* page background */
  --white: #ffffff;
  --link: #1a4f8b;

  --serif: "Gentium Book Plus", "Charis SIL", "Doulos SIL", Georgia, serif;
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --ipa: "Lab IPA", "Charis SIL", "Doulos SIL", "Gentium Plus", serif;

  --measure: 68ch;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--navy);
  padding: .5rem 1rem; font-family: var(--sans); z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Masthead ---------- */
.masthead {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.masthead-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.lab-name {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.lab-name a { color: inherit; text-decoration: none; }
.lab-ipa {
  display: block;
  font-family: var(--ipa);
  font-weight: 400;
  font-size: 1.05rem;
  color: #c8d2e2;
  margin-top: .35rem;
  letter-spacing: 0;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem;
  font-family: var(--sans); font-size: 1rem;
}
.site-nav a {
  color: #e6ebf3; text-decoration: none;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--white); border-bottom-color: #8fa3c2; }
.site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--gold); }

/* The waveform: the one decorative element on the site */
.waveform {
  display: block;
  width: 100%;
  height: 72px;
  margin-top: 1.25rem;
}
.waveform path { fill: var(--gold); }

/* ---------- Main content ---------- */
main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.prose { max-width: var(--measure); }

h1, h2, h3 {
  font-family: var(--sans);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 600;
}
h1 { font-size: 2rem; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin: 3rem 0 1rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
main > h2:first-child, .section:first-child h2 { margin-top: 0; }

p { margin: 0 0 1rem; }
.lede { font-size: 1.25rem; line-height: 1.55; max-width: 60ch; }
.meta { color: var(--slate); font-size: .95rem; }
.note {
  border-left: 3px solid var(--gold);
  padding: .25rem 0 .25rem 1rem;
  color: var(--ink);
  max-width: var(--measure);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 3.5rem;
}
@media (min-width: 52rem) {
  .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
.aside h2 { margin-top: 0; }

address { font-style: normal; line-height: 1.55; }

/* ---------- People ---------- */
.people {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr));
  column-gap: 3rem;
}
.person {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
.avatar {
  width: 5.5rem; height: 5.5rem;
  border-radius: 50%;
  background: #e3e8f0;
  color: var(--navy);
  font-family: var(--sans); font-weight: 600; font-size: 1.4rem;
  display: grid; place-items: center;
  overflow: hidden; position: relative;
}
.avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.person-name {
  font-family: var(--sans); font-weight: 600;
  font-size: 1.1rem; color: var(--navy);
  margin: 0;
}
.person-name a { color: inherit; }
.ipa { font-family: var(--ipa); color: var(--slate); font-size: 1rem; display: block; }
.person p { margin: .2rem 0 0; font-size: 1rem; line-height: 1.5; }

.alumni {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  column-gap: 3rem;
}
.alumni li { padding: .8rem 0; border-top: 1px solid var(--rule); font-size: 1rem; }
.alumni .person-name { font-size: 1rem; display: inline; }

/* ---------- Publications, grants, dissertations ---------- */
.year-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 1rem;
}
@media (min-width: 46rem) {
  .year-group { grid-template-columns: 6rem minmax(0, 1fr); gap: 1.5rem; }
}
.year {
  font-family: var(--sans); font-weight: 600; color: var(--navy);
  font-size: 1.1rem; margin: 0 0 .5rem;
}
.refs { list-style: none; margin: 0; padding: 0; max-width: 78ch; }
.refs li {
  padding-left: 1.5rem; text-indent: -1.5rem;   /* hanging indent, as in a bibliography */
  margin-bottom: .75rem; font-size: 1rem; line-height: 1.55;
}
.refs a { word-break: break-word; }

.grant-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.grant-list li { padding: .9rem 0; border-top: 1px solid var(--rule); font-size: 1rem; }
.grant-list .when {
  font-family: var(--sans); font-size: .9rem; color: var(--slate);
  display: block; margin-bottom: .15rem;
}

.toc { font-family: var(--sans); font-size: .95rem; margin: 0 0 2rem; }
.toc a { margin-right: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--white);
  font-size: .95rem;
  color: var(--slate);
}
.site-footer .inner {
  max-width: 72rem; margin: 0 auto; padding: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}
.site-footer p { margin: 0; }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .person { grid-template-columns: 4.25rem minmax(0, 1fr); }
  .avatar { width: 4.25rem; height: 4.25rem; font-size: 1.15rem; }
  .waveform { height: 48px; }
}

@media print {
  .masthead { background: none; color: #000; }
  .waveform, .site-nav, .skip-link { display: none; }
  .lab-name, .lab-ipa { color: #000; }
}

/* Any IPA marked with lang="und-fonipa" uses the IPA font */
[lang="und-fonipa"] { font-family: var(--ipa); }
