/* IRIS Lab V3 North Star
   Tokens ported from the design package (tokens/tokens.css).
   Self-hosted Geist, with Source Serif 4 for the Home title. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
}

:root {
  --iris-bg: #0c100e;
  --iris-ink: #e8eee9;
  --iris-muted: #9aaba0;
  --iris-muted-2: #b7c6bb;
  --iris-ink-soft: #c5d2c9;
  --iris-mint: #8fc1a9;
  --iris-mint-hover: #b5d9c6;
  --iris-orange: #e87500;
  --iris-rule: rgba(143, 193, 169, 0.22);
  --iris-rule-strong: rgba(143, 193, 169, 0.35);
  --iris-focus: #8fc1a9;
  --iris-btn-ink: #0c100e;
  --iris-footer: #7f9086;
  --iris-btn-active: #7bb396;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fixed type: 17px grows the round 4 reference by 6.25% at every viewport.
     Keep the rem hierarchy; only the existing heading step below 900px
     reduces type on smaller screens. */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-nav: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-page: 2.5rem;
  --text-hero: 3.25rem;

  /* Match People cards and text to the 288px portrait from the 1920px
     reference. Gallery thumbnails keep their independent responsive sizing. */
  --portrait-size: 288px;
  --photo-thumb-size: clamp(180px, 14.5vw, 560px);

  --old-gutter: 72px;
  --min-gutter: 18px;
  --page-inset: 12px;
  --focus-ring: 2px solid var(--iris-focus);
  --focus-offset: 2px;
}

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

html {
  color-scheme: light dark;
  font-size: 17px;
}

@media (prefers-color-scheme: light) {
  :root {
    --iris-bg: #f9f9f9;
    --iris-ink: #202020;
    --iris-muted: #5e5e5e;
    --iris-muted-2: #535353;
    --iris-ink-soft: #464646;
    --iris-mint: #246345;
    --iris-mint-hover: #174e34;
    --iris-orange: #b25900;
    --iris-rule: rgba(89, 89, 89, 0.22);
    --iris-rule-strong: rgba(89, 89, 89, 0.35);
    --iris-focus: #246345;
    --iris-btn-ink: #f9f9f9;
    --iris-footer: #626262;
    --iris-btn-active: #1f583b;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--iris-bg);
  color: var(--iris-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
}

/* Link contract: mint for :link and :visited. Never browser blue. */
a:link,
a:visited,
a:any-link {
  color: var(--iris-mint);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 140ms ease, background-color 140ms ease;
}

a:hover {
  color: var(--iris-mint-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-120%);
  background: var(--iris-mint);
  color: var(--iris-btn-ink);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 8px 12px;
  z-index: 10;
}

.skip-link:focus {
  transform: none;
  color: var(--iris-btn-ink);
}

.page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* With available width A, the old column was min(A - 2g, 948px, A/2 + 308px).
     Half its side gaps gives min(A - g, A/2 + 474px, 3A/4 + 154px).
     Percentages use available width, excluding a classic scrollbar. Keep at least
     18px on each side and cap at the exact 3840px result above that viewport.
     Round 5 insets that shell by 12px per desktop side, including its cap.
     Keep geometry in px so the larger rem type cannot expand the shell.
     No inline padding: this border-box width is also the usable content width. */
  width: calc(min(calc(100% - 2 * var(--min-gutter)), calc(100% - var(--old-gutter)), calc(50% + 474px), calc(75% + 154px)) - 2 * var(--page-inset));
  max-width: calc(2394px - 2 * var(--page-inset));
  margin-inline: auto;
  padding: 44px 0 56px;
  --roster-cols: 3;
  --roster-gap: 28px;
}

/* Short pages: main absorbs leftover viewport space so the footer sits at the bottom.
   Tall pages: the shell grows with the document and the footer follows the content. */
main { flex: 1 0 auto; }

.site-header {
  flex-shrink: 0;
  margin-bottom: 40px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--iris-rule-strong);
}

.logo,
.logo:link,
.logo:visited {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iris-mint);
  text-decoration: none;
  line-height: 1;
}

.logo:hover,
.logo:focus-visible { color: var(--iris-mint-hover); text-decoration: none; }

.logo-dot {
  display: inline-block;
  color: var(--iris-orange);
  font-style: normal;
  margin-right: 8px;
  letter-spacing: 0;
  /* Recording LED: soft opacity pulse and a faint glow. The wordmark stays still. */
  animation: iris-rec-light 1.4s ease-in-out infinite;
}

@keyframes iris-rec-light {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 7px color-mix(in srgb, var(--iris-orange) 55%, transparent);
  }

  50% {
    opacity: 0.35;
    text-shadow: 0 0 0 color-mix(in srgb, var(--iris-orange) 0%, transparent);
  }
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a,
.nav-links a:link,
.nav-links a:visited {
  color: var(--iris-muted);
  font-size: var(--text-nav);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  padding-bottom: 2px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--iris-ink);
  text-decoration: none;
}

.nav-links a[aria-current="page"],
.nav-links a[aria-current="page"]:link,
.nav-links a[aria-current="page"]:visited,
.nav-links a[aria-current="page"]:hover {
  color: var(--iris-ink);
  box-shadow: inset 0 -2px 0 var(--iris-orange);
}

.kicker,
.section-label {
  font-family: var(--font-sans);
  text-transform: none;
  color: var(--iris-orange);
  margin: 0 0 14px;
}

.kicker {
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.6;
  letter-spacing: normal;
}

.section-label {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.section-label .layout-tag {
  color: var(--iris-footer);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

h1 {
  font-family: var(--font-sans);
  font-weight: 650;
  color: var(--iris-ink);
  margin: 0 0 16px;
}

.hero { margin-bottom: 44px; }

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page-head { margin-bottom: 28px; }
.page-head h1 {
  font-size: var(--text-page);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.expand {
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.45;
  color: var(--iris-mint);
  margin: 0 0 18px;
}

.mission {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--iris-muted-2);
  margin: 0;
}

.lede,
.page-head p {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--iris-muted);
  margin: 0;
}

/* .page-head p is more specific than .kicker. Restate the eyebrow so it stays orange sans. */
.page-head .kicker {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.6;
  letter-spacing: normal;
  text-transform: none;
  color: var(--iris-orange);
  margin: 0 0 14px;
}

.prose {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--iris-muted-2);
}

.prose p { margin: 0 0 14px; }

.prose a:link:not(.btn),
.prose a:visited:not(.btn),
.news-body a:link,
.news-body a:visited {
  text-decoration: underline;
}

.section-label.spaced { margin-top: 28px; }

.cta {
  margin-top: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:active {
  display: inline-block;
  background: var(--iris-mint);
  color: var(--iris-btn-ink);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 0;
}

.btn:hover { background: var(--iris-mint-hover); color: var(--iris-btn-ink); text-decoration: none; }
.btn:active { background: var(--iris-btn-active); color: var(--iris-btn-ink); }

.btn-ghost,
.btn-ghost:link,
.btn-ghost:visited {
  background: transparent;
  color: var(--iris-ink);
  padding: 12px 0;
  border-bottom: 1px solid var(--iris-orange);
  text-decoration: none;
}

.btn-ghost:hover { color: var(--iris-mint); background: transparent; text-decoration: none; }

.band {
  padding-top: 36px;
  border-top: 1px solid var(--iris-rule);
  margin: 0;
}

.featured-kicker { margin-bottom: 0; }

.featured-title {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.25;
  color: var(--iris-ink);
  margin: 10px 0 12px;
}

.featured-meta {
  font-size: var(--text-sm);
  color: var(--iris-muted);
  line-height: 1.55;
  margin: 0 0 14px;
}

.featured-meta strong {
  color: var(--iris-ink-soft);
  font-weight: 600;
}

.pub-year + .pub-year { margin-top: 12px; }

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--iris-rule);
}

.pub.nofig { grid-template-columns: minmax(0, 1fr); }

/* Home reuses the publication figure and two-column layout without a second rule. */
.featured-work {
  padding: 0;
  border-bottom: 0;
}


.pub-tags {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 8px;
}

.kind {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--iris-mint);
  line-height: 1.5;
}

.year-tag,
.news-item time {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--iris-orange);
  line-height: 1.5;
}

.news-item time { display: block; margin-bottom: 8px; }

.pub-title {
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--iris-ink);
  margin: 0 0 8px;
  overflow-wrap: break-word;
}

.pub-authors {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--iris-ink-soft);
  margin: 0 0 6px;
}

.pub-authors strong { font-weight: 650; }

.pub-authornote {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--iris-ink-soft);
  font-style: italic;
  margin: -2px 0 6px;
}

.pub-venue {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--iris-muted);
  margin: 0 0 10px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 1em;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.pub-links a:link,
.pub-links a:visited { text-decoration: none; }
.pub-links a:hover { text-decoration: underline; }

.pub-fig { margin: 0; }
.pub-fig img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  filter: saturate(0.88) contrast(1.04);
}

.pub-fig figcaption,
.photo-grid figcaption {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--iris-footer);
}

.pub-fig figcaption { text-align: center; }

.home-sections {
  display: grid;
  gap: 40px;
}

#featured-root:empty { display: none; }

.news-body {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.55;
  color: var(--iris-ink-soft);
  margin: 0;
}

.news-item + .news-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--iris-rule);
}

.person {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
}

.person h3 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: var(--iris-ink);
}

.person .role {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.3;
  color: var(--iris-muted);
  margin-top: 3px;
}

.roster {
  display: grid;
  /* Fixed desktop tracks make natural text wrapping independent of the shell.
     Tracks may shrink below the portrait width when space is limited. */
  grid-template-columns: repeat(var(--roster-cols), minmax(0, var(--portrait-size)));
  gap: var(--roster-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.roster-group + .roster-group { margin-top: 36px; }

.member h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--iris-ink);
}

.member .role {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.3;
  color: var(--iris-mint);
  margin: 0 0 8px;
}

.member .role:has(+ .dates) {
  margin-bottom: 2px;
}

.member .dates {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.35;
  color: var(--iris-footer);
  margin: 0 0 8px;
}

.person-photo,
.person img,
.member img,
.person-photo-link img {
  object-fit: cover;
  filter: grayscale(0.12) contrast(1.05);
  display: block;
}

.person img,
.person .person-photo-link,
.person .person-photo-placeholder {
  width: 64px;
  height: 64px;
}

.member img,
.member .person-photo-link,
.member .person-photo-placeholder {
  width: min(100%, var(--portrait-size));
  aspect-ratio: 1;
  margin: 0 0 12px;
  height: auto;
  object-position: center 20%;
}

.member .person-photo-link,
.person .person-photo-link { display: block; }

.member .person-photo-link img {
  width: 100%;
  margin-bottom: 0;
}

.person-photo-link:hover,
.person-photo-link:focus-visible { text-decoration: none; }

.person-photo-placeholder {
  display: grid;
  place-items: center;
  background: var(--iris-bg);
  color: var(--iris-mint);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px var(--iris-rule);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(var(--roster-cols), minmax(0, 1fr));
  gap: var(--roster-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.photo-grid figure { margin: 0; }

.photo-grid picture {
  display: block;
  width: min(100%, var(--photo-thumb-size));
}

.photo-grid img {
  width: min(100%, var(--photo-thumb-size));
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-grid picture img { width: 100%; }

.site-footer {
  flex-shrink: 0;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--iris-rule-strong);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.3;
  color: var(--iris-footer);
}

.empty {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--iris-muted-2);
}

@media (max-width: 899px) {
  :root {
    --text-xl: 1.5rem;
    --text-page: 2rem;
    --text-hero: 2.5rem;
    --portrait-size: clamp(180px, 32vw, 288px);
    --photo-thumb-size: clamp(180px, 32vw, 288px);
  }

  .page {
    --old-gutter: var(--min-gutter);
    --page-inset: 0px;
    --roster-cols: 2;
    padding: 32px 0 40px;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-links { gap: 14px; flex-wrap: wrap; }

  /* Preserve the existing full-width responsive text columns on small screens. */
  .roster { grid-template-columns: repeat(var(--roster-cols), minmax(0, 1fr)); }

  .hero h1 { line-height: 1.1; }
  .cta { flex-direction: column; align-items: flex-start; gap: 12px; }

  .pub {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
  }

  .featured-work { padding: 0; }

  .site-footer { flex-direction: column; }
}

@media (max-width: 599px) {
  :root {
    --portrait-size: clamp(180px, 50vw, 260px);
    --photo-thumb-size: clamp(180px, 50vw, 260px);
  }

  .page { --roster-cols: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .logo-dot {
    animation: none !important;
    opacity: 1;
    text-shadow: none;
  }
}
