/* Self-hosted Inter (variable) — served from this site so it works everywhere,
   including networks where Google Fonts is slow/blocked. */
@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-var.woff2") format("woff2");
}

:root {
  --bg: #f7f8fa;
  --paper: #ffffff;
  --text: #17191d;
  --muted: #5b616b;
  --subtle: #888f99;
  --line: #e1e4e8;
  --soft: #eef1f5;
  --accent: #3157d5;
  --accent-strong: #2442a7;
  --accent-soft: #e8edff;
  --warm: #3157d5;
  --warm-strong: #2442a7;
  --warm-soft: #edf1ff;
  --focus: rgba(49, 87, 213, 0.3);
  --card-hover-border: #c7ccd3;
  --card-shadow: rgba(25, 32, 43, 0.08);
  --badge-bg: #3157d5;
  --badge-ink: #ffffff;
  --dot-idle: #c8cdd4;
  --tl-line: #dce0e5;
  --nav-bg: rgba(247, 248, 250, 0.9);
  --sans: "InterVariable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --nav-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --paper: #191c21;
    --text: #f2f2f2;
    --muted: #b5b5b5;
    --subtle: #858585;
    --line: #30343b;
    --soft: #23272e;
    --accent: #9db2ff;
    --accent-strong: #c0cdff;
    --accent-soft: #202d56;
    --warm: #9db2ff;
    --warm-strong: #c0cdff;
    --warm-soft: #202d56;
    --focus: rgba(157, 178, 255, 0.42);
    --card-hover-border: #4a505a;
    --card-shadow: rgba(0, 0, 0, 0.55);
    --badge-bg: #9db2ff;
    --badge-ink: #0d1220;
    --dot-idle: #4a4a4a;
    --tl-line: #383d45;
    --nav-bg: rgba(17, 19, 23, 0.9);
  }
}

/* V9 compact academic introduction — an identity rail beside the research story. */
.hero {
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(50px, 6.5vw, 76px);
  align-items: start;
  padding: 38px 0 78px;
}

.profile-rail {
  position: sticky;
  top: calc(var(--nav-h) + 26px);
  align-self: start;
}

.profile-rail .portrait-frame {
  justify-self: auto;
  width: 100%;
}

.profile-rail .portrait-crop {
  height: 246px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.profile-rail .portrait {
  transform: scale(1.34);
  transform-origin: 57% 44%;
}

.profile-rail .portrait-frame figcaption {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--subtle);
}

.profile-rail h1 {
  margin-top: 18px;
  font-size: 25px;
  font-weight: 710;
  line-height: 1.16;
  letter-spacing: -0.034em;
}

.profile-rail h1 span {
  margin-left: 5px;
  font-size: 0.54em;
  letter-spacing: -0.01em;
  transform: none;
}

.profile-position {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.profile-position a {
  color: var(--text);
  font-weight: 610;
  text-decoration-color: var(--line);
}

.profile-rail .profile-links {
  gap: 7px;
  margin-top: 16px;
}

.profile-rail .profile-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
  font-size: 11px;
  font-weight: 590;
}

.profile-rail .profile-links a:hover {
  color: var(--accent-strong);
  border-color: var(--card-hover-border);
  background: var(--soft);
}

.hero-copy {
  max-width: 730px;
  padding-top: 4px;
}

.hero-copy .hero-eyebrow {
  margin-bottom: 10px;
}

.hero-copy > h2 {
  max-width: 25ch;
  font-size: clamp(30px, 3.3vw, 39px);
  font-weight: 690;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.hero-copy .hero-summary {
  max-width: 62ch;
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: -0.01em;
}

.hero-copy .hero-focus {
  margin-top: 0;
}

.hero-copy .hero-focus li + li {
  margin-top: 7px;
}

.hero-copy .hero-meta {
  grid-template-columns: minmax(140px, 0.62fr) minmax(0, 1.38fr);
  margin-top: 25px;
  padding-top: 14px;
}

.hero-latest {
  margin-top: 34px;
}

.hero-latest-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--text);
}

.hero-latest-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.hero-latest-heading a {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 570;
  text-decoration: none;
}

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

.hero-latest li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.hero-latest time {
  color: var(--subtle);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-latest li a {
  color: var(--text);
  font-weight: 610;
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 24px;
  }

  .profile-rail {
    position: static;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-areas:
      "portrait name"
      "portrait position"
      "portrait links";
    column-gap: 24px;
    align-items: start;
  }

  .profile-rail .portrait-frame {
    grid-area: portrait;
  }

  .profile-rail .portrait-crop {
    height: 196px;
  }

  .profile-rail h1 {
    grid-area: name;
    margin-top: 8px;
  }

  .profile-position {
    grid-area: position;
  }

  .profile-rail .profile-links {
    grid-area: links;
  }

  .hero-copy {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .profile-rail {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "name"
      "position"
      "links";
  }

  .profile-rail .portrait-frame {
    width: min(72vw, 238px);
  }

  .profile-rail .portrait-crop {
    height: 232px;
  }

  .profile-rail h1 {
    margin-top: 16px;
    font-size: 29px;
  }

  .hero-copy > h2 {
    font-size: 30px;
  }

  .hero-copy .hero-summary {
    font-size: 16px;
  }

  .hero-copy .hero-meta {
    grid-template-columns: 1fr;
  }

  .hero-latest li {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 14px);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings:
    "liga" 1,
    "calt" 1,
    "cv05" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration-color: #8c8c8c;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

button {
  font: inherit;
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Minimal sticky top nav (OpenAI-style restraint) */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  width: min(100% - 48px, 1040px);
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: var(--text);
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.topnav-links a {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.16s ease,
    background 0.16s ease;
}

.topnav-links a:hover {
  color: var(--text);
  background: var(--soft);
}

.page {
  width: min(100% - 48px, 1040px);
  margin: 50px auto 64px;
}

/* Compact academic introduction — reading-first copy with a quiet portrait. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: clamp(56px, 7vw, 82px);
  align-items: center;
  padding: 44px 0 84px;
}

.hero-copy {
  max-width: 690px;
}

.portrait-frame {
  justify-self: end;
  width: min(100%, 272px);
  margin: 0;
}

.portrait-crop {
  width: 100%;
  height: 292px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--soft);
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 39%;
  transform: scale(1.16);
  transform-origin: 57% 47%;
  box-shadow: none;
}

.portrait-frame figcaption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  letter-spacing: -0.005em;
  text-align: left;
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: clamp(44px, 4.5vw, 54px);
  font-weight: 710;
  letter-spacing: -0.048em;
}

h1 span {
  display: inline-block;
  margin-left: 11px;
  color: var(--muted);
  font-size: 0.4em;
  font-weight: 520;
  letter-spacing: -0.012em;
  transform: translateY(-0.08em);
}

h2 {
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.019em;
}

.hero-role {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hero-role a {
  color: var(--accent-strong);
  font-weight: 620;
  text-decoration-color: rgba(49, 87, 213, 0.42);
}

.hero-summary {
  max-width: 57ch;
  margin: 30px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 460;
  line-height: 1.57;
  letter-spacing: -0.018em;
}

.hero-summary > p {
  margin: 0;
}

.hero-focus {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.hero-focus li {
  position: relative;
  padding-left: 22px;
}

.hero-focus li + li {
  margin-top: 5px;
}

.hero-focus li::before {
  content: "–";
  position: absolute;
  left: 1px;
  color: var(--subtle);
}

.hero-meta {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.45fr);
  gap: 14px 28px;
  max-width: 650px;
  margin-top: 28px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.hero-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.hero-meta p > span {
  display: block;
  margin-bottom: 2px;
  color: var(--subtle);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-meta a {
  color: var(--text);
  font-weight: 560;
  text-decoration-color: var(--line);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 18px;
}

.profile-links a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 590;
  text-decoration: none;
  transition:
    color 0.16s ease,
    border-color 0.16s ease;
}

.profile-links a:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

/* Research roadmap */
.roadmap-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.68fr) minmax(0, 1.32fr);
  gap: 46px;
  align-items: center;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 14px);
}

.roadmap-heading {
  max-width: 340px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 740;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.roadmap-heading h2 {
  max-width: 18ch;
  color: var(--text);
  font-size: clamp(25px, 2.6vw, 31px);
  line-height: 1.11;
}

.roadmap-heading > p:last-child {
  max-width: 33ch;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.roadmap-section .section-kicker {
  color: var(--accent);
}

.roadmap-figure {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
  cursor: zoom-in;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.roadmap-figure:hover {
  border-color: var(--card-hover-border);
  box-shadow: 0 10px 30px var(--card-shadow);
  transform: translateY(-1px);
}

.roadmap-figure:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.roadmap-figure img {
  width: 100%;
  height: auto;
}

.roadmap-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  background: rgba(16, 31, 78, 0.76);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  pointer-events: none;
}

.roadmap-figure:hover .roadmap-zoom-hint,
.roadmap-figure:focus-visible .roadmap-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Section dividers + shared section spacing */
.divider {
  margin: 76px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.research-section,
.plain-section {
  margin-top: 0;
}

.research-section {
  max-width: 1036px;
  margin-right: auto;
  margin-left: auto;
}

.section-note {
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 14px;
}

.news-list li a,
.compact-list li a {
  text-decoration-color: var(--accent);
}

/* Select AI Research — vertical timeline (papers by arXiv date, newest first) */
.timeline {
  position: relative;
  margin: 22px 0 0;
  padding: 0 0 0 104px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 84px;
  width: 2px;
  background: var(--tl-line);
}

.tl-item {
  position: relative;
  margin-bottom: 14px;
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-marker {
  position: absolute;
  top: 22px;
  left: -26px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--paper);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 2;
}

.tl-date {
  position: absolute;
  top: 21px;
  left: -104px;
  width: 72px;
  text-align: right;
  color: var(--accent-strong);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}

.tl-card {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.tl-card::before {
  content: "";
  position: absolute;
  top: 24px;
  left: -20px;
  width: 20px;
  height: 2px;
  background: var(--tl-line);
}

.tl-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: 0 6px 20px var(--card-shadow);
  transform: translateY(-1px);
}

.tl-figure {
  position: relative;
  flex: 0 0 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 176px;
  margin: 0;
  padding: 16px;
  background: #ffffff;
  border: 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
  cursor: zoom-in;
  -webkit-appearance: none;
  appearance: none;
}

.tl-figure:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.tl-figure img {
  max-width: 100%;
  max-height: 204px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.tl-card:hover .tl-figure img {
  transform: scale(1.02);
}

.tl-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(17, 16, 22, 0.74);
  color: #fff;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  pointer-events: none;
}

.tl-figure:hover .tl-zoom-hint,
.tl-figure:focus-visible .tl-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.tl-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 18px 15px;
}

.tl-body .tags {
  margin-top: 9px;
}

.tl-body .venue {
  margin-top: 8px;
}

.tl-body .tldr {
  margin-top: 8px;
}

.tl-body .paper-links {
  margin-top: 11px;
}

.paper-title {
  display: inline;
  font-size: 17px;
  font-weight: 720;
  line-height: 1.3;
}

.tl-item:first-child .paper-title {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
  white-space: normal;
  text-wrap: balance;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  color: var(--warm-strong);
  background: var(--warm-soft);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.venue,
.tldr,
.details,
.plain-section p,
.compact-list {
  color: var(--muted);
}

.venue {
  margin: 12px 0 0;
  font-size: 14px;
}

.tldr {
  margin: 12px 0 0;
}

.tldr strong {
  color: var(--accent);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

.paper-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.paper-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 16px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--text);
  text-decoration: underline;
}

/* X discussion trigger — opens a lightbox of the real posts (static, resilient when X is blocked) */
.x-disc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  padding: 6px 8px 6px 11px;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.x-disc:hover {
  border-color: var(--card-hover-border);
  background: var(--paper);
  transform: translateY(-1px);
}

.x-disc .x-logo {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.x-disc-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

/* X discussion modal (lightbox) */
.x-modal[hidden] {
  display: none;
}

.x-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.x-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 16, 22, 0.55);
  backdrop-filter: blur(3px);
  animation: x-fade 0.16s ease;
}

.x-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  max-height: min(88vh, 940px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: x-pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes x-fade {
  from {
    opacity: 0;
  }
}

@keyframes x-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.x-modal-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.x-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 720;
}

.x-modal-title .x-logo {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.x-modal-close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease;
}

.x-modal-close:hover {
  color: var(--text);
  background: var(--warm-soft);
}

.x-modal-body {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.x-post {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.x-post + .x-post {
  margin-top: 12px;
}

.x-post:hover {
  border-color: var(--card-hover-border);
  box-shadow: 0 6px 18px var(--card-shadow);
}

.x-post img {
  display: block;
  width: 100%;
  height: auto;
}

.x-more-label {
  margin: 20px 2px 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
}

body.x-modal-open {
  overflow: hidden;
}

/* Figure zoom lightbox */
.img-zoom[hidden] {
  display: none;
}

.img-zoom {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.img-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 16, 0.82);
  backdrop-filter: blur(4px);
  animation: x-fade 0.16s ease;
}

.img-zoom-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: min(1100px, 96vw);
  margin: 0;
  animation: x-pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.img-zoom-panel img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.img-zoom-caption {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

.img-zoom-close {
  position: absolute;
  top: -14px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #15141a;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.16s ease;
}

.img-zoom-close:hover {
  transform: scale(1.08);
}

/* Updates — news and talks share one editorial closing section. */
.updates-section {
  scroll-margin-top: calc(var(--nav-h) + 14px);
}

.updates-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 0.66fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.updates-heading .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: -18px;
}

.updates-heading h2 {
  font-size: 32px;
  letter-spacing: -0.035em;
}

.updates-heading > p:last-child {
  max-width: none;
  margin: 0;
  color: var(--muted);
  justify-self: end;
  white-space: nowrap;
}

.updates-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.update-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: none;
}

.panel-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 740;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.update-panel h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.022em;
}

.compact-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.compact-list li:first-child {
  border-top: 0;
}

.compact-list time {
  display: inline-block;
  width: 122px;
  color: var(--subtle);
}

.news-panel .compact-list li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  font-size: 14px;
  line-height: 1.5;
}

.news-panel .compact-list time {
  width: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.news-panel .link-button {
  margin-top: 12px;
  color: var(--accent-strong);
  font-weight: 610;
}

/* Publications list */
.pub-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.pub-item {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.pub-item:first-child {
  border-top: 0;
}

.pub-title-link {
  font-size: 16px;
  font-weight: 680;
  line-height: 1.35;
  color: var(--accent);
  text-decoration: none;
}

.pub-title-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent-strong);
}

.pub-authors {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pub-authors .me {
  color: var(--text);
  font-weight: 650;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 8px;
}

.pub-venue {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.15;
}

.pub-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pub-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.pub-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.pub-scholar {
  margin-top: 16px;
}

/* Talks — grouped by talk, with each venue carrying its own date. */
.talks-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.talk {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.talk:first-child {
  border-top: 0;
}

.talk-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 660;
  line-height: 1.42;
  letter-spacing: -0.011em;
}

.talk-venues {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.talk-venue {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0 3px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.talk-venue::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.63em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.talk-when {
  margin-left: auto;
  color: var(--subtle);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Open-source ledger */
.open-source-section {
  scroll-margin-top: calc(var(--nav-h) + 14px);
}

.open-source-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 32px;
}

.open-source-heading h2 {
  max-width: 22ch;
  font-size: 32px;
  letter-spacing: -0.035em;
}

.open-source-heading > p {
  max-width: 43ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  justify-self: end;
}

.open-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 46px;
}

.open-source-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  padding: 24px 0 26px;
  border-top: 1px solid var(--line);
}

.open-source-card:nth-child(-n + 2) {
  border-top: 2px solid var(--text);
}

.open-source-kind {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.025em;
}

.open-source-kind span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 710;
}

.open-source-kind .venue-tag {
  background: var(--soft);
  color: var(--muted);
  font-weight: 640;
}

.open-source-card h3 {
  margin: 7px 0 0;
  font-size: 22px;
  font-weight: 690;
  letter-spacing: -0.025em;
}

.open-source-card h3 a {
  text-decoration: none;
}

.open-source-card h3 a:hover {
  color: var(--accent-strong);
}

.open-source-card > p:not(.open-source-kind) {
  max-width: 48ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.open-source-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}

.open-source-metrics div {
  min-width: 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.open-source-metrics dt {
  color: var(--subtle);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.open-source-metrics dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}

.open-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 19px;
}

.open-source-links a {
  color: var(--accent-strong);
  font-size: 12.5px;
  font-weight: 610;
  text-decoration: none;
}

.open-source-links a::after {
  content: " ↗";
  color: var(--subtle);
}

.open-source-links a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

/* Responsive */
@media (max-width: 840px) {
  .page {
    width: min(100% - 32px, 640px);
    margin-top: 42px;
  }

  .topnav-inner {
    width: min(100% - 32px, 640px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 26px 0 64px;
  }

  .portrait-frame {
    justify-self: start;
    width: min(68vw, 272px);
  }

  .portrait-crop {
    height: 260px;
  }

  .roadmap-section {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 0;
  }

  .roadmap-heading {
    max-width: 540px;
  }

  .roadmap-heading h2 {
    max-width: 22ch;
  }

  .updates-heading,
  .updates-grid,
  .open-source-heading {
    grid-template-columns: 1fr;
  }

  .updates-heading {
    gap: 12px;
  }

  .updates-heading .section-kicker {
    margin-bottom: -4px;
  }

  .updates-heading > p:last-child {
    justify-self: start;
    white-space: normal;
  }

  .open-source-heading {
    gap: 12px;
  }

  .open-source-heading > p {
    justify-self: start;
  }

  .timeline {
    padding-left: 84px;
  }

  .timeline::before {
    left: 64px;
  }

  .tl-date {
    left: -84px;
    width: 54px;
  }

  .tl-card {
    flex-direction: column;
  }

  .tl-figure {
    flex: none;
    width: 100%;
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tl-figure img {
    max-height: 260px;
  }

  .divider {
    margin: 68px 0;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .page {
    width: min(100% - 24px, 640px);
    margin-top: 24px;
    margin-bottom: 48px;
  }

  .topnav-inner {
    width: min(100% - 16px, 640px);
    gap: 4px;
  }

  .brand {
    font-size: 13px;
  }

  .topnav-links {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topnav-links::-webkit-scrollbar {
    display: none;
  }

  .topnav-links a {
    padding: 5px 4px;
    font-size: 12px;
  }

  h1 {
    font-size: 40px;
  }

  h1 span {
    display: block;
    margin: 5px 0 0;
  }

  h2 {
    font-size: 22px;
  }

  .hero-role {
    margin-top: 12px;
  }

  .hero-summary {
    margin-top: 22px;
    font-size: 18px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .profile-links {
    gap: 10px 20px;
    margin-top: 20px;
  }

  .profile-links a {
    padding: 0 0 2px;
    font-size: 12px;
  }

  .portrait-frame {
    width: min(72vw, 250px);
    margin: 0;
  }

  .portrait-crop {
    height: 236px;
  }

  .roadmap-section {
    padding: 28px 0;
  }

  .roadmap-figure {
    border-radius: 14px;
  }

  .roadmap-zoom-hint {
    opacity: 1;
    transform: none;
  }

  .divider {
    margin: 56px 0;
  }

  .tl-figure {
    min-height: 128px;
    padding: 13px;
  }

  .tl-figure img {
    max-height: 210px;
  }

  .tl-body {
    padding: 13px 15px 15px;
  }

  .paper-title {
    font-size: 16px;
  }

  .tl-item:first-child .paper-title {
    font-size: 14px;
    white-space: normal;
  }

  .compact-list time {
    display: block;
    width: auto;
    margin-bottom: 2px;
  }

  .update-panel {
    padding: 21px;
    border-radius: 10px;
  }

  .news-panel .compact-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .open-source-grid {
    grid-template-columns: 1fr;
  }

  .open-source-card:nth-child(n) {
    border-top: 1px solid var(--line);
  }

  .open-source-card:first-child {
    border-top: 2px solid var(--text);
  }

  .open-source-heading h2 {
    font-size: 26px;
  }
}

/* Keep the V9 hero layout last in the cascade; the remaining sections retain
   the proven V8 styles above. */
.hero {
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(50px, 6.5vw, 76px);
  align-items: start;
  padding: 38px 0 78px;
}

.hero-copy {
  max-width: 730px;
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 24px 0 64px;
  }
}

@media (max-width: 520px) {
  .hero {
    gap: 34px;
    padding-top: 10px;
  }
}

.hero-bio {
  max-width: 68ch;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.66;
  letter-spacing: -0.008em;
}

.hero-bio p {
  margin: 0;
}

.hero-bio p + p,
.hero-bio .hero-focus + p {
  margin-top: 20px;
}

.hero-bio a {
  text-decoration-color: var(--line);
}

.hero-bio-lead {
  font-weight: 680;
}

.hero-bio .hero-focus {
  margin: 8px 0 0;
  font-size: 15.5px;
}

.hero-contact a {
  color: var(--accent-strong);
  font-weight: 650;
}

@media (max-width: 520px) {
  .hero-bio,
  .hero-bio .hero-focus {
    font-size: 15px;
  }
}

.open-source-card:nth-child(-n + 2) {
  border-top: 1px solid var(--line);
}

.open-source-card--featured {
  grid-column: 1 / -1;
  border-top: 2px solid var(--text);
}

.open-source-card--featured .open-source-metrics {
  max-width: 540px;
}

@media (max-width: 520px) {
  .open-source-card--featured {
    grid-column: auto;
    border-top: 2px solid var(--text);
  }
}

/* V10 multi-page information architecture */
.topnav-links a.is-active {
  color: var(--text);
  background: var(--soft);
  font-weight: 620;
}

.section-cta {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.section-cta:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.home-featured {
  padding: 76px 0 0;
}

.home-featured-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.home-featured-heading h2 {
  font-size: 30px;
  letter-spacing: -0.035em;
}

.home-featured-heading .section-cta {
  margin: 0 0 2px;
  white-space: nowrap;
}

.featured-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--text);
  list-style: none;
}

.featured-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: baseline;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.featured-index {
  color: var(--subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.featured-list li > div > a {
  color: var(--text);
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.018em;
  text-decoration: none;
}

.featured-list li > div > a:hover {
  color: var(--accent-strong);
}

.featured-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.featured-meta {
  color: var(--subtle);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.subpage {
  margin-top: 0;
}

.page-masthead {
  padding: 76px 0 66px;
  border-bottom: 1px solid var(--line);
}

.page-masthead-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.96fr) minmax(280px, 0.72fr);
  gap: clamp(48px, 8vw, 100px);
  align-items: end;
}

.page-masthead h1 {
  max-width: 12ch;
  font-size: clamp(44px, 5.8vw, 67px);
  line-height: 0.99;
  letter-spacing: -0.058em;
}

.page-masthead-grid > p {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.page-masthead-grid > p a {
  color: var(--accent-strong);
  font-weight: 620;
  text-decoration: none;
}

.research-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 42px 0 76px;
  border-top: 2px solid var(--text);
  border-bottom: 1px solid var(--line);
}

.research-pillars article {
  padding: 28px 32px 31px 0;
}

.research-pillars article + article {
  padding-right: 0;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.research-pillars span,
.pub-status {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.research-pillars h2 {
  margin-top: 8px;
  font-size: 21px;
}

.research-pillars p {
  max-width: 38ch;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.research-page-section > h2 {
  font-size: 32px;
  letter-spacing: -0.035em;
}

.publication-ledger {
  margin-top: 48px;
}

.publication-year-group {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 34px;
  padding: 0 0 54px;
}

.publication-year-group > h2 {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  align-self: start;
  padding-top: 2px;
  color: var(--subtle);
  font-size: 15px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.publication-rows {
  border-top: 2px solid var(--text);
}

.pub-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
}

.pub-row h3 {
  max-width: 760px;
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 675;
  line-height: 1.38;
  letter-spacing: -0.018em;
}

.pub-row h3 a {
  text-decoration-color: var(--line);
}

.pub-row--selected h3 a {
  text-decoration-color: rgba(49, 87, 213, 0.42);
}

.pub-status {
  margin: 0;
}

.pub-row .pub-authors {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.55;
}

.pub-row .pub-links {
  justify-content: flex-end;
  padding-bottom: 1px;
  white-space: nowrap;
}

.resource-category-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 0.55fr);
  gap: 32px;
  align-items: baseline;
  margin-top: 52px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}

.resource-category-heading:first-of-type {
  margin-top: 44px;
}

.resource-category-heading span {
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.resource-category-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.open-source-page .open-source-card,
.open-source-page .open-source-card:nth-child(n),
.open-source-page .open-source-card--featured {
  border-top: 0;
}

.open-source-page .open-source-card--featured {
  grid-column: 1 / -1;
}

.updates-page {
  margin-top: 48px;
}

.updates-page .updates-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.updates-page .update-panel h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.022em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 840px) {
  .page-masthead {
    padding: 54px 0 48px;
  }

  .page-masthead-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-masthead h1 {
    max-width: 14ch;
  }

  .publication-year-group {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 22px;
  }

  .updates-page .updates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  :root {
    --nav-h: 92px;
  }

  .topnav-inner {
    height: auto;
    min-height: var(--nav-h);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding: 8px 0;
  }

  .topnav-links {
    width: 100%;
  }

  .topnav-links a {
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .home-featured {
    padding-top: 56px;
  }

  .home-featured-heading {
    display: block;
  }

  .home-featured-heading .section-cta {
    margin-top: 12px;
  }

  .featured-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
  }

  .featured-meta {
    grid-column: 2;
    text-align: left;
  }

  .research-pillars {
    grid-template-columns: 1fr;
    margin-bottom: 58px;
  }

  .research-pillars article,
  .research-pillars article + article {
    padding: 23px 0;
    border-left: 0;
  }

  .research-pillars article + article {
    border-top: 1px solid var(--line);
  }

  .publication-year-group {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 42px;
  }

  .publication-year-group > h2 {
    position: static;
  }

  .pub-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pub-row .pub-links {
    justify-content: flex-start;
  }

  .resource-category-heading {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .open-source-page .open-source-card--featured {
    grid-column: auto;
  }
}

/* V10 plain academic pages -------------------------------------------------
   Home, Publications, Open Source, and Updates intentionally read like a
   small academic document. The Research page is not scoped into these rules. */
.plain-page {
  --bg: #fafafa;
  --paper: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --subtle: #8a9098;
  --line: #e3e5e8;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.plain-page .topnav {
  position: static;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.plain-page .topnav-inner {
  width: min(calc(100% - 40px), 900px);
  height: auto;
  padding: 26px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.plain-page .brand {
  width: max-content;
  color: var(--text);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.plain-page .topnav-links {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 2px;
  padding: 8px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(20, 24, 32, 0.045);
}

.plain-page .topnav-links a {
  padding: 5px 12px;
  border-radius: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.plain-page .topnav-links a:hover,
.plain-page .topnav-links a.is-active {
  color: var(--accent-strong);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.plain-page .page {
  width: min(calc(100% - 40px), 900px);
  margin: 20px auto 48px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 12px rgba(20, 24, 32, 0.045);
}

.plain-page .hero {
  display: block;
  padding: 0;
}

.plain-page .profile-rail {
  position: static;
  display: block;
}

.plain-page .profile-rail .portrait-frame {
  float: right;
  width: 180px;
  margin: 0 0 18px 28px;
}

.plain-page .profile-rail .portrait-crop {
  height: 180px;
  border-radius: 0;
}

.plain-page .profile-rail .portrait {
  transform: scale(1.2);
  transform-origin: 57% 44%;
}

.plain-page .profile-rail .portrait-frame figcaption {
  margin-top: 5px;
  font-size: 11px;
}

.plain-page .profile-rail h1 {
  margin: 0 0 9px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-strong);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.plain-page .profile-rail h1 span {
  font-size: 0.55em;
  font-weight: 500;
}

.plain-page .profile-position {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.plain-page .profile-rail .profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.plain-page .profile-rail .profile-links a {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--accent-strong);
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plain-page .profile-rail .profile-links a:hover {
  color: var(--accent);
  border: 0;
  background: transparent;
}

.plain-page .hero-copy {
  max-width: none;
  padding: 22px 0 0;
}

.plain-page .hero-eyebrow {
  display: none;
}

.plain-page .hero-bio {
  max-width: none;
  font-size: 15px;
  line-height: 1.6;
}

.plain-page .hero-bio p,
.plain-page .hero-bio-lead,
.plain-page .hero-focus,
.plain-page .hero-contact {
  margin-top: 13px;
}

.plain-page .hero-focus {
  padding-left: 22px;
}

.plain-page .hero-focus li + li {
  margin-top: 4px;
}

.plain-page .hero-bio a,
.plain-page .page-masthead a,
.plain-page .section-cta {
  color: var(--accent-strong);
}

.plain-page .roadmap-section {
  clear: both;
  display: block;
  margin-top: 30px;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.plain-page .roadmap-heading {
  max-width: none;
}

.plain-page .roadmap-heading .section-kicker {
  display: none;
}

.plain-page .roadmap-heading h2 {
  max-width: none;
  margin: 0;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--accent-strong);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plain-page .roadmap-heading > p:last-of-type {
  max-width: none;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.plain-page .section-cta {
  display: inline-block;
  margin-top: 9px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: underline;
}

.plain-page .roadmap-figure {
  width: min(100%, 740px);
  margin: 18px auto 0;
  border-radius: 0;
  box-shadow: none;
}

.plain-page .page-masthead {
  max-width: none;
  padding: 0 0 12px;
  border: 0;
}

.plain-page .page-masthead-grid {
  display: block;
}

.plain-page .page-masthead h1 {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-strong);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.plain-page .page-masthead-grid > p {
  max-width: none;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.plain-page .publication-ledger {
  margin-top: 4px;
}

.plain-page .publication-year-group {
  display: block;
  padding: 0 0 18px;
}

.plain-page .publication-year-group > h2 {
  position: static;
  margin: 17px 0 0;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--accent-strong);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}

.plain-page .publication-rows {
  border: 0;
}

.plain-page .pub-row {
  display: block;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.plain-page .pub-row:hover {
  border-color: var(--line);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.plain-page .pub-row h3 {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.38;
}

.plain-page .pub-status {
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.plain-page .pub-row .pub-authors {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.plain-page .pub-row .pub-links {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 6px;
  padding: 0;
  border: 0;
}

.plain-page .pub-links a {
  color: var(--accent-strong);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plain-page .resource-category-heading {
  display: block;
  margin-top: 20px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--accent-strong);
}

.plain-page .resource-category-heading:first-of-type {
  margin-top: 15px;
}

.plain-page .resource-category-heading span {
  font-size: 21px;
  font-weight: 700;
}

.plain-page .resource-category-heading p {
  margin-top: 4px;
  font-size: 13px;
}

.plain-page .open-source-grid {
  display: block;
}

.plain-page .open-source-page .open-source-card,
.plain-page .open-source-page .open-source-card.open-source-card--featured {
  display: block;
  grid-column: auto;
  padding: 14px 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.plain-page .open-source-card h3 {
  margin-top: 3px;
  font-size: 19px;
}

.plain-page .open-source-card > p:not(.resource-kicker) {
  max-width: none;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.plain-page .resource-kicker {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.plain-page .open-source-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 28px;
  margin-top: 9px;
}

.plain-page .open-source-metrics div {
  min-width: 0;
  padding: 0;
  border: 0;
}

.plain-page .open-source-metrics dt {
  font-size: 10px;
}

.plain-page .open-source-metrics dd {
  margin-top: 1px;
  font-size: 13px;
}

.plain-page .open-source-links {
  gap: 13px;
  margin-top: 9px;
}

.plain-page .open-source-links a {
  color: var(--accent-strong);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plain-page .updates-page {
  margin-top: 12px;
}

.plain-page .updates-page .updates-grid {
  display: block;
}

.plain-page .updates-page .update-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.plain-page .updates-page .update-panel + .update-panel {
  margin-top: 32px;
}

.plain-page .panel-label {
  display: none;
}

.plain-page .update-panel h2 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent-strong);
  font-size: 21px;
  font-weight: 700;
}

.plain-page .news-row {
  padding: 8px 0;
  font-size: 14px;
}

.plain-page .talk-group {
  padding: 10px 0;
}

.plain-page .talk-group h3 {
  font-size: 15px;
}

.plain-page .site-footer {
  margin-top: 30px;
  padding-top: 11px;
  font-size: 12px;
}

@media (max-width: 620px) {
  .plain-page .topnav-inner,
  .plain-page .page {
    width: min(calc(100% - 20px), 900px);
  }

  .plain-page .topnav-inner {
    padding-top: 18px;
  }

  .plain-page .topnav-links {
    padding: 7px 5px;
  }

  .plain-page .topnav-links a {
    padding: 4px 7px;
    font-size: 12px;
  }

  .plain-page .page {
    margin-top: 12px;
    padding: 21px 18px;
  }

  .plain-page .profile-rail .portrait-frame {
    float: none;
    width: 170px;
    margin: 0 0 18px;
  }

  .plain-page .hero-copy {
    padding-top: 18px;
  }

  .plain-page .publication-year-group {
    display: block;
  }

  .plain-page .news-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }
}

/* V10.1 — return to the quiet V9 academic character. The site remains
   multipage, but subpages read like reference pages rather than landing pages. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --nav-bg: rgba(250, 250, 250, 0.92);
  }
}

.topnav-links a.is-active {
  border-radius: 0;
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 -1px 0 var(--text);
  font-weight: 610;
}

.topnav-links a.is-active:hover {
  background: transparent;
}

.page-masthead {
  max-width: 820px;
  padding: 54px 0 36px;
  border-bottom: 1px solid var(--line);
}

.page-masthead-grid {
  display: block;
}

.page-masthead h1 {
  max-width: none;
  font-size: clamp(30px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-masthead-grid > p {
  max-width: 66ch;
  margin-top: 13px;
  font-size: 14.5px;
  line-height: 1.68;
}

.research-page-section {
  margin-top: 48px;
}

.research-page-section > h2 {
  font-size: 25px;
  letter-spacing: -0.022em;
}

.publication-ledger {
  margin-top: 34px;
}

.publication-year-group {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 42px;
}

.publication-year-group > h2 {
  top: calc(var(--nav-h) + 22px);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 570;
}

.publication-rows {
  border-top: 1px solid var(--text);
}

.pub-row {
  padding: 18px 0 20px;
}

.pub-row h3 {
  font-size: 16px;
  font-weight: 665;
}

.pub-status {
  color: var(--subtle);
  font-size: 9.5px;
  letter-spacing: 0.075em;
}

.pub-status .pub-venue {
  color: var(--accent);
  font-weight: 730;
}

.pub-status .pub-note {
  color: var(--subtle);
  font-weight: 650;
}

.resource-category-heading {
  margin-top: 38px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--text);
}

.resource-category-heading:first-of-type {
  margin-top: 34px;
}

.resource-category-heading span {
  font-size: 18px;
  font-weight: 670;
}

.open-source-page .open-source-card {
  padding-top: 20px;
}

.updates-page {
  margin-top: 36px;
}

.updates-page .updates-grid {
  grid-template-columns: 1fr;
  gap: 52px;
}

.updates-page .talks-panel {
  max-width: 760px;
}

.updates-page .update-panel {
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
}

@media (max-width: 840px) {
  .page-masthead {
    padding: 40px 0 30px;
  }

  .publication-year-group {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 620px) {
  .topnav-links a.is-active {
    box-shadow: inset 0 -1px 0 var(--text);
  }

  .page-masthead {
    padding-top: 30px;
  }

  .publication-year-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .updates-page .updates-grid {
    gap: 34px;
  }
}

/* V10.1 — a single, aligned home introduction. */
.plain-page .topnav-inner {
  padding-top: 18px;
  gap: 0;
}

.plain-page .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 32px;
  align-items: start;
  padding: 0;
}

.plain-page .hero-copy {
  grid-column: 1;
  grid-row: 1;
  max-width: none;
  padding: 0;
}

.plain-page .hero-bio p:first-child {
  margin-top: 0;
}

.plain-page .home-portrait {
  grid-column: 2;
  grid-row: 1;
  width: 180px;
  margin: 0;
}

.plain-page .home-portrait .portrait-crop {
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.plain-page .home-portrait .portrait {
  transform: scale(1.2);
  transform-origin: 57% 44%;
}

.plain-page .home-portrait figcaption {
  margin-top: 5px;
  color: var(--subtle);
  font-size: 11px;
}

.research-roadmap {
  margin-top: 12px;
}

@media (max-width: 620px) {
  .plain-page .hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .plain-page .hero-copy,
  .plain-page .home-portrait {
    grid-column: 1;
    grid-row: auto;
  }

  .plain-page .home-portrait {
    width: 160px;
  }

  .plain-page .home-portrait .portrait-crop {
    height: 160px;
  }
}

/* V11 contact row — quiet enough to remain part of the introduction. */
.home-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-top: 13px;
  font-size: 13px;
}

.home-social-links a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Research keeps its cards and timeline, but now shares the plain v11 shell. */
.plain-research-page {
  --bg: #fafafa;
  --paper: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --subtle: #8a9098;
  --line: #e3e5e8;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.plain-research-page .topnav {
  position: static;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.plain-research-page .topnav-inner {
  width: min(calc(100% - 40px), 900px);
  height: auto;
  padding: 18px 0 0;
  display: grid;
  grid-template-columns: 1fr;
}

.plain-research-page .topnav-links {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 2px;
  padding: 8px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(20, 24, 32, 0.045);
}

.plain-research-page .topnav-links a {
  padding: 5px 12px;
  border-radius: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.plain-research-page .topnav-links a:hover,
.plain-research-page .topnav-links a.is-active {
  color: var(--accent-strong);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.plain-research-page .page {
  width: min(calc(100% - 40px), 900px);
  margin: 20px auto 48px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 12px rgba(20, 24, 32, 0.045);
}

.plain-research-page .page-masthead {
  max-width: none;
  padding: 0 0 12px;
  border: 0;
}

.plain-research-page .page-masthead-grid {
  display: block;
}

.plain-research-page .page-masthead h1 {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-strong);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.plain-research-page .page-masthead-grid > p {
  max-width: none;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.plain-research-page .research-roadmap {
  margin-top: 18px;
  padding-top: 24px;
  border-top: 0;
}

.plain-research-page .research-roadmap .roadmap-heading h2 {
  font-size: clamp(24px, 2.2vw, 28px);
}

.plain-research-page .roadmap-title-line {
  white-space: nowrap;
}

@media (max-width: 620px) {
  .plain-research-page .topnav-inner,
  .plain-research-page .page {
    width: min(calc(100% - 20px), 900px);
  }

  .plain-research-page .topnav-links {
    padding: 7px 5px;
  }

  .plain-research-page .topnav-links a {
    padding: 4px 7px;
    font-size: 12px;
  }

  .plain-research-page .page {
    margin-top: 12px;
    padding: 21px 18px;
  }

  .plain-research-page .roadmap-title-line {
    white-space: normal;
  }
}

/* V12 — one soft shell, with flat and quiet content inside. */
.plain-page,
.plain-research-page {
  --shell-bg: #f7f9fc;
  --shell-line: #edf0f4;
  margin: 0;
  padding: 48px 20px;
  background: var(--shell-bg);
}

.site-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 0 48px 36px;
  overflow: hidden;
  border: 1px solid rgba(45, 69, 105, 0.08);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(26, 48, 83, 0.08);
}

.site-shell .topnav {
  position: static;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-shell .topnav-inner {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 27px 0 17px;
  border-bottom: 1px solid var(--shell-line);
}

.site-shell .topnav-links {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 25px;
  padding: 0;
  overflow-x: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-shell .topnav-links a {
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13.5px;
  font-weight: 450;
  text-decoration: none;
  white-space: nowrap;
}

.site-shell .topnav-links a:hover,
.site-shell .topnav-links a.is-active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.site-shell .page {
  width: 100%;
  margin: 0;
  padding: 34px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-shell .page-masthead {
  max-width: none;
  margin: 0;
  padding: 0 0 26px;
  border: 0;
}

.site-shell .page-masthead h1 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.site-shell .page-masthead-grid > p {
  max-width: 68ch;
  margin-top: 9px;
  color: var(--muted);
}

.plain-research-page .site-shell .page-masthead-grid > p,
.publications-page .site-shell .page-masthead-grid > p {
  max-width: none;
}

.site-shell .hero {
  padding-top: 2px;
}

.site-shell .home-portrait .portrait-crop {
  overflow: hidden;
  border-color: var(--shell-line);
  border-radius: 12px;
}

.site-shell .home-social-links {
  display: inline-flex;
  gap: 8px;
  margin-top: 18px;
}

.site-shell .home-social-links a {
  --social-color: var(--muted);
  --social-soft: var(--accent-soft);
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--shell-line);
  border-radius: 50%;
  color: var(--social-color);
  background: transparent;
  text-decoration: none;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.site-shell .home-social-links a:hover {
  color: var(--social-color);
  border-color: var(--social-color);
  background: var(--social-soft);
}

.site-shell .home-social-links a[aria-label="Email"] {
  --social-color: #3157d5;
  --social-soft: rgba(49, 87, 213, 0.09);
}

.site-shell .home-social-links a[aria-label="Google Scholar"] {
  --social-color: #4285f4;
  --social-soft: rgba(66, 133, 244, 0.1);
}

.site-shell .home-social-links a[aria-label="GitHub"] {
  --social-color: #24292f;
  --social-soft: rgba(36, 41, 47, 0.08);
}

.site-shell .home-social-links a[aria-label="X"] {
  --social-color: #0f1419;
  --social-soft: rgba(15, 20, 25, 0.08);
}

.site-shell .home-social-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.social-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-icon--stroke {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.site-shell .publication-year-group > h2,
.site-shell .resource-category-heading,
.site-shell .update-panel h2 {
  border-color: var(--shell-line);
}

.site-shell .publication-year-group > h2 {
  padding-bottom: 7px;
}

.site-shell .pub-row,
.site-shell .open-source-page .open-source-card,
.site-shell .open-source-page .open-source-card.open-source-card--featured,
.site-shell .news-row,
.site-shell .talk-group {
  border-color: var(--shell-line);
}

.site-shell .resource-category-heading {
  padding-bottom: 8px;
  border-bottom-width: 1px;
}

.site-shell .update-panel h2 {
  padding-bottom: 7px;
  border-bottom-width: 1px;
}

.site-shell .research-roadmap {
  margin-top: 4px;
  padding-top: 18px;
  padding-bottom: 38px;
  border-top: 0;
  border-bottom: 1px solid var(--shell-line);
}

.site-shell .roadmap-figure {
  overflow: hidden;
  border-color: var(--shell-line);
  border-radius: 14px;
}

.site-shell .roadmap-figure:hover {
  border-color: #dce2e9;
  box-shadow: 0 12px 32px rgba(26, 48, 83, 0.08);
}

.site-shell .research-page-section {
  margin-top: 38px;
}

.site-shell .tl-card {
  overflow: hidden;
  border-color: #e4e8ed;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(26, 48, 83, 0.035);
}

.site-shell .tags span,
.site-shell .x-disc {
  border-radius: 999px;
}

.site-shell .site-footer {
  margin-top: 38px;
  padding-top: 16px;
  border-color: var(--shell-line);
}

@media (max-width: 840px) {
  .plain-page,
  .plain-research-page {
    padding: 28px 16px;
  }

  .site-shell {
    padding-right: 32px;
    padding-left: 32px;
  }
}

@media (max-width: 620px) {
  .plain-page,
  .plain-research-page {
    padding: 12px 10px;
  }

  .site-shell {
    width: 100%;
    padding: 0 18px 24px;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(26, 48, 83, 0.07);
  }

  .site-shell .topnav-inner {
    padding: 18px 0 13px;
  }

  .site-shell .topnav-links {
    gap: 16px;
  }

  .site-shell .topnav-links a {
    padding-bottom: 3px;
    font-size: 12px;
  }

  .site-shell .page {
    padding-top: 25px;
  }

  .site-shell .page-masthead {
    padding: 0 0 22px;
  }

  .site-shell .page-masthead h1 {
    font-size: 25px;
  }

  .site-shell .research-roadmap {
    padding-top: 8px;
  }
}

/* Home — training as a progressively organized knowledge network. */
.knowledge-network-section {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 54px);
  align-items: center;
  margin-top: clamp(48px, 6vw, 62px);
  padding: 0 0 46px;
  border-top: 0;
  border-bottom: 0;
}

.knowledge-network-copy .section-kicker {
  margin: 0 0 10px;
}

.knowledge-network-copy h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.knowledge-network-copy > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.knowledge-network-visual {
  min-width: 0;
}

.knowledge-network-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.knowledge-network-tabs button {
  appearance: none;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 560;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.knowledge-network-tabs button:hover {
  color: var(--accent-strong);
  border-color: rgba(49, 87, 213, 0.28);
}

.knowledge-network-tabs button[aria-pressed="true"] {
  color: var(--accent-strong);
  border-color: transparent;
  background: var(--accent-soft);
}

.knowledge-network-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.knowledge-network-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin: 12px 0 4px;
  font-size: 11.5px;
  line-height: 1.5;
}

.knowledge-network-status strong {
  color: var(--text);
  font-weight: 650;
}

.knowledge-network-status span {
  color: var(--subtle);
}

.knowledge-network {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.knowledge-base-edges line {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.68;
}

.knowledge-active-edges line {
  stroke: var(--accent);
  stroke-linecap: round;
  opacity: 0;
  transition:
    opacity 420ms ease,
    stroke-width 420ms ease;
}

.knowledge-nodes circle {
  fill: var(--paper);
  stroke: var(--subtle);
  stroke-width: 1.25;
  transition:
    fill 420ms ease,
    stroke 420ms ease,
    r 420ms ease,
    opacity 420ms ease;
}

.knowledge-axis text {
  fill: var(--subtle);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.05em;
}

@media (max-width: 740px) {
  .knowledge-network-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .knowledge-network-copy {
    max-width: 54ch;
  }
}

@media (max-width: 460px) {
  .knowledge-network-section {
    margin-top: 42px;
    padding: 0 0 38px;
  }

  .knowledge-network-copy h2 {
    font-size: 22px;
  }

  .knowledge-network-tabs button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-active-edges line,
  .knowledge-nodes circle,
  .knowledge-network-tabs button {
    transition: none;
  }
}
