/* ==========================================================================
   Stylesheet for the whole site. Plain CSS, no build step.
   Contents: 1 fonts, 2 colours and sizes, 3 base elements, 4 header and
   footer, 5 home page, 6 program pages and code lists, 7 people, 8 publications.
   ========================================================================== */

/* 1. Fonts ------------------------------------------------------------------
   The font files are in assets/fonts/. `unicode-range` tells the browser which
   characters each file holds, so the "latin-ext" files (accented letters such
   as ć or ł) are downloaded only when a page uses those characters. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

/* 2. Colours and sizes ------------------------------------------------------
   Every colour on the site is defined here once and used by name below.
   Polar work is blue, EMPIRIC is a warm red-orange. `--accent` is whichever
   of the two applies to the current page or card. */

:root {
  --paper: #fbfbf9;         /* page background */
  --surface: #ffffff;       /* cards */
  --ink: #132330;           /* main text */
  --ink-2: #46545f;         /* secondary text */
  --ink-3: #66737d;         /* dates and small labels */
  --rule: #e1e5e8;          /* thin lines */
  --rule-strong: #c5ccd1;

  --polar: #1b6a94;
  --polar-deep: #0d4a6b;
  --polar-tint: #e7f1f6;
  --empiric: #c2532d;
  --empiric-deep: #963a19;
  --empiric-tint: #fbede6;

  --accent: var(--ink);
  --accent-deep: var(--ink);
  --accent-tint: #eef1f3;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 10px;
  color-scheme: light;
}

.program-polar {
  --accent: var(--polar);
  --accent-deep: var(--polar-deep);
  --accent-tint: var(--polar-tint);
}
.program-empiric {
  --accent: var(--empiric);
  --accent-deep: var(--empiric-deep);
  --accent-tint: var(--empiric-tint);
}

/* 3. Base elements ---------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  letter-spacing: -0.025em;
  font-weight: 400;
}
h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

time {
  white-space: nowrap;
}

.wrap {
  max-width: 71rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus {
  top: 1rem;
}

.lead {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 44rem;
  margin: 1rem 0 0;
}

.section {
  margin-top: clamp(3rem, 7vw, 5rem);
}
.section > h2,
.section__title {
  margin-bottom: 1.5rem;
}

/* Two columns side by side on wide screens, stacked on narrow screens */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
}

.more {
  margin: 1.25rem 0 0;
  font-weight: 500;
}

.empty,
.note {
  color: var(--ink-3);
  font-size: 0.95rem;
}

/* Long-form text (program introductions, Code of Conduct, Contact) */
.prose {
  max-width: 44rem;
}
.prose h2 {
  margin: 2.25rem 0 0.75rem;
}
.prose h3 {
  margin: 1.75rem 0 0.5rem;
}
.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}
.prose ul {
  list-style: disc;
}
.prose li {
  margin-bottom: 0.35em;
}

.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 2.75rem);
}

/* 4. Header and footer ------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-block: 0.9rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}
.wordmark__name {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.mark {
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.1rem 1.5rem;
}
.site-nav a {
  display: block;
  padding-block: 0.35rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav__note {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-3);
}
.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule-strong);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-footer {
  margin-top: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-block: 2.25rem 3rem;
}
.site-footer p {
  margin: 0;
}
.site-footer__name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}
.site-footer__links li + li {
  margin-top: 0.3rem;
}

/* 5. Home page -------------------------------------------------------------- */

.home-title {
  margin-top: clamp(2rem, 6vw, 4rem);
  font-size: clamp(2.9rem, 8.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 380;
}
.transect {
  width: 100%;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.home-pubs {
  max-width: 50rem;
}
.home-intro {
  max-width: 44rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 1.15rem;
}
.program-link {
  color: var(--accent-deep);
}

/* Dated one-line items: news */
.updates {
  border-top: 1px solid var(--rule);
}
.update {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.update__date {
  font-size: 0.85rem;
  color: var(--ink-3);
  padding-top: 0.15rem;
}
.update__text {
  margin: 0;
  font-size: 0.97rem;
  overflow-wrap: anywhere;
}
.update__text span {
  color: var(--ink-2);
}

/* 6. Program pages: tools and repositories are plain lists ------------------- */

.tools,
.repos,
.support {
  max-width: 50rem;
  border-top: 1px solid var(--rule);
}
.tool,
.repo,
.support li {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.tool__name,
.repo__name {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.tool__text,
.repo__text {
  margin: 0.25rem 0 0;
  color: var(--ink-2);
  font-size: 0.97rem;
}
.tool__links,
.repo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.1rem;
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.support li {
  font-size: 0.97rem;
  color: var(--ink-2);
}
.forks {
  margin: 1rem 0 0;
  font-size: 0.93rem;
  color: var(--ink-2);
  max-width: 50rem;
}
.code-org h2 a {
  color: var(--ink);
}

/* 7. People ----------------------------------------------------------------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 2.25rem 1.5rem;
}
.person {
  scroll-margin-top: 1.5rem;
}
.person__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: var(--accent-tint);
}
.person__photo--none {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--ink-3);
  background: #eef1f3;
}
.person__body {
  padding-top: 0.9rem;
}
.person__name {
  font-size: 1.25rem;
}
.person__title {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.person__interests,
.person__bio {
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.person__bio p:last-child {
  margin-bottom: 0;
}
.person__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}

.alumni {
  max-width: 44rem;
  border-top: 1px solid var(--rule);
}
.alumni li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.1rem 1.5rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.alumni__name {
  font-weight: 500;
}
.alumni__now {
  color: var(--ink-2);
}

/* 8. Publications ----------------------------------------------------------- */

.pubs {
  border-top: 1px solid var(--rule);
}
.pub {
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}
.pub p {
  margin: 0;
}
.pub__title {
  font-weight: 500;
  line-height: 1.4;
}
.pub__title a {
  color: var(--ink);
  text-decoration-color: var(--rule-strong);
}
.pub__title a:hover {
  text-decoration-color: var(--ink);
}
.pub__authors {
  margin-top: 0.25rem !important;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.pub__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
  margin-top: 0.35rem !important;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.pub__venue {
  font-style: italic;
}
.pub__year {
  color: var(--ink-3);
}

/* On the Publications page: the year in a narrow left column on wide screens */
.pub-year {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.pub-year h2 {
  font-size: 1.5rem;
  color: var(--ink-3);
}
@media (min-width: 52rem) {
  .pub-year {
    grid-template-columns: 7rem minmax(0, 46rem);
    gap: 2rem;
  }
  .pub-year h2 {
    padding-top: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.program-link + p,
.split h2 + p {
  margin-top: 0.5rem;
}

.pubs--narrow {
  max-width: 46rem;
}

/* On screens wider than a phone, people photos are at least 14.5rem wide. */
@media (min-width: 40rem) {
  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  }
}

/* The photograph at the top of a program page */
.program-image {
  width: 100%;
  aspect-ratio: 4 / 1;        /* the same thin strip on both program pages */
  object-fit: cover;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 4px;
}
