:root {
  --bg: #f8f8f6;
  --surface: #ffffff;
  --surface-alt: #f2f5f4;
  --ink: #20242a;
  --muted: #646b73;
  --line: #dfe4e2;
  --accent: #0b6f68;
  --accent-dark: #064f4a;
  --accent-soft: #e2f0ed;
  --warm: #a94f34;
  --shadow: 0 18px 45px rgba(32, 36, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

a {
  color: var(--accent-dark);
  text-decoration-color: rgba(11, 111, 104, 0.35);
  text-underline-offset: 0.2em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-180%);
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 2.5rem;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

.profile-panel {
  position: sticky;
  top: 2rem;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.headshot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 28%;
  border-bottom: 1px solid var(--line);
}

.profile-copy,
.profile-links {
  padding: 1.25rem;
}

.role,
.kicker,
.venue,
time {
  margin: 0;
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-copy h1 {
  margin: 0.35rem 0 0.5rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.25rem;
  line-height: 1.05;
}

.institution {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.profile-links {
  display: grid;
  gap: 0.15rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-links a {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  border-radius: 4px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.profile-links a:hover {
  background: var(--surface-alt);
  color: var(--accent-dark);
  padding-left: 0.5rem;
}

.main-panel {
  min-width: 0;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 248, 246, 0.94);
  padding: 0.8rem 0;
  backdrop-filter: blur(12px);
}

.brand {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.tab-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow-x: auto;
}

.tab-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.48rem 0.68rem;
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--accent-dark);
  background: var(--surface-alt);
}

.tab-button.is-active {
  border-color: rgba(11, 111, 104, 0.28);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tab-panel {
  max-width: 850px;
  padding: clamp(2rem, 5vw, 4rem) 0 2rem;
}

.tab-panel h2 {
  margin: 0.25rem 0 1.25rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
}

.tab-panel h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.16rem;
  line-height: 1.25;
}

.tab-panel h4 {
  margin: 0 0 0.28rem;
  font-size: 1rem;
}

.prose {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.04rem;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.compact-grid article,
.publication,
.news-list article,
.cv-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 1rem;
}

.education-timeline {
  position: relative;
  display: grid;
  gap: 0;
  max-width: 680px;
  margin: 1.55rem 0 0;
  padding-left: 0.25rem;
}

.education-timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0 0 1.3rem;
}

.education-timeline article::before {
  content: "";
  position: absolute;
  left: 0.47rem;
  top: 1.05rem;
  bottom: -0.1rem;
  width: 2px;
  background: var(--line);
}

.education-timeline article:last-child {
  padding-bottom: 0;
}

.education-timeline article:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.25rem;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.education-timeline span {
  display: block;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.education-timeline strong {
  display: block;
  margin-top: 0.1rem;
  line-height: 1.35;
}

.education-timeline p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.compact-grid p,
.publication p,
.news-list p,
.cv-panel p {
  margin: 0;
  color: var(--muted);
}

.news-list,
.publication-list,
.group-list {
  display: grid;
  gap: 0.9rem;
}

.work-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.work-group summary {
  display: grid;
  grid-template-columns: minmax(92px, 118px) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 1rem;
}

.work-group summary::-webkit-details-marker {
  display: none;
}

.work-group summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  color: var(--accent);
  font-weight: 800;
}

.work-group[open] summary::after {
  content: "-";
}

.work-group summary {
  position: relative;
  padding-right: 2.4rem;
}

.work-group summary span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.work-group summary strong {
  line-height: 1.32;
}

.work-group .publication-list,
.group-note {
  border-top: 1px solid var(--line);
  padding: 1rem;
}

.group-note {
  margin: 0;
  color: var(--muted);
}

.news-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
}

.publication h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.authors {
  margin-top: 0.4rem;
}

.venue {
  margin-top: 0.45rem !important;
  color: var(--warm) !important;
  letter-spacing: 0.04em;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid h3 {
  margin: 0 0 0.4rem;
}

.cv-panel {
  max-width: 620px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  margin-top: 1.15rem;
  border-radius: 4px;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 800;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
}

.primary-link:hover {
  background: var(--accent);
  color: #fff;
}

.footer {
  max-width: 850px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.25rem 0 0;
}

@media (max-width: 920px) {
  .site-shell {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 28px));
    gap: 1.25rem;
  }

  .profile-panel {
    position: static;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .headshot {
    height: 100%;
    min-height: 250px;
  }

  .profile-links {
    grid-column: 2;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tab-nav {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 20px, 520px);
    padding-top: 0.65rem;
  }

  .profile-panel,
  .education-timeline,
  .compact-grid,
  .news-list article {
    grid-template-columns: 1fr;
  }

  .headshot {
    aspect-ratio: 5 / 4;
    min-height: 0;
    object-position: 50% 22%;
  }

  .profile-links {
    grid-column: auto;
  }

  .work-group summary {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .tab-panel h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

}

/* Research directions */

.directions {
  margin-top: 2.6rem;
}

.section-head h3 {
  margin: 0;
}

.section-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.levels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr);
  align-items: stretch;
  margin-top: 1.1rem;
}

.level {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 1rem 1.05rem 1.1rem;
  overflow: hidden;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.level::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0.35);
  transform-origin: top;
  transition: transform 260ms ease;
}

.level:hover {
  border-color: rgba(11, 111, 104, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.level:hover::after {
  transform: scaleY(1);
}

.level-index,
.explorer-label,
.project-num,
.project-domain,
.modality-scale,
.post-meta {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.level h4 {
  margin: 0.25rem 0 0.35rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.22rem;
}

.level p {
  margin: 0;
  color: var(--muted);
}

.level-link {
  display: grid;
  place-items: center;
}

.level-link span {
  display: block;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
  background-size: 24px 2px;
  opacity: 0.55;
  animation: link-flow 1.4s linear infinite;
}

@keyframes link-flow {
  to {
    background-position: 24px 0;
  }
}

.explorer-label {
  margin: 1.9rem 0 0.7rem;
}

/* Project explorer */

.project-explorer {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-tabs {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--line);
  background: var(--surface-alt);
}

.project-tab {
  position: relative;
  display: grid;
  gap: 0.05rem;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 0.95rem 1rem 0.95rem 1.15rem;
  text-align: left;
  transition: background-color 200ms ease;
}

.project-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-tab:hover {
  background: rgba(255, 255, 255, 0.6);
}

.project-tab.is-active {
  background: var(--surface);
}

.project-tab.is-active::before {
  transform: scaleY(1);
}

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

.project-num {
  color: var(--muted);
  transition: color 200ms ease;
}

.project-tab.is-active .project-num {
  color: var(--accent);
}

.project-acronym {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-domain {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.project-stage {
  min-width: 0;
}

.js .project-stage {
  display: grid;
}

.project-panel {
  min-width: 0;
}

.project-panel + .project-panel {
  border-top: 1px solid var(--line);
}

.js .project-panel {
  grid-area: 1 / 1;
  border-top: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(28px);
  transition:
    opacity 260ms ease,
    transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s linear 420ms;
}

.js .project-panel.is-before {
  transform: translateX(-28px);
}

.js .project-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 320ms ease 80ms,
    transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s;
}

.project-visual {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(226, 240, 237, 0.9), rgba(255, 255, 255, 0) 70%),
    var(--surface);
  padding: 0.9rem 1rem 0.6rem;
}

.viz {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.project-body {
  padding: 1.1rem 1.2rem 1.25rem;
}

.project-body h4 {
  margin: 0.7rem 0 0.4rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.2;
}

.project-body p {
  margin: 0;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.12rem 0.55rem;
}

.project-question {
  margin: 0.85rem 0 0;
  border-left: 3px solid var(--warm);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.5;
  padding: 0.1rem 0 0.1rem 0.85rem;
}

.project-pager {
  display: none;
}

/* Project visuals */

.viz-label {
  fill: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-anchor: middle;
}

.viz-agents .edge-ring {
  fill: none;
  stroke: var(--line);
  stroke-dasharray: 3 5;
  stroke-width: 1.5;
}

.viz-agents .edge {
  stroke: var(--line);
  stroke-width: 2;
}

.viz-agents .flow {
  stroke: var(--accent);
  stroke-dasharray: 3 10;
  stroke-linecap: round;
  stroke-width: 2.5;
  animation: dash-flow 1.6s linear infinite;
}

.viz-agents .flow.is-reverse {
  animation-direction: reverse;
}

.viz-agents .hub {
  fill: var(--accent);
}

.viz-agents .hub-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-ring 2.4s ease-out infinite;
}

.viz-agents .hub-label {
  fill: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  text-anchor: middle;
}

.viz-agents .agent {
  fill: var(--surface);
  stroke: var(--accent-dark);
  stroke-width: 2.5;
  animation: agent-think 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.viz-time .axis,
.viz-time .ticks line {
  stroke: var(--line);
  stroke-width: 1.5;
}

.viz-time .trace {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.project-panel.is-active .viz-time .trace {
  animation: draw-trace 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.viz-time .trace-a {
  stroke: var(--accent);
}

.viz-time .trace-b {
  stroke: var(--warm);
  animation-delay: 0.15s !important;
}

.viz-time .trace-c {
  stroke: #8b949c;
  animation-delay: 0.3s !important;
}

.viz-time .scan {
  animation: scan 4.5s ease-in-out infinite;
}

.viz-time .scan line {
  stroke: var(--accent-dark);
  stroke-dasharray: 2 4;
  stroke-width: 1.2;
}

.viz-time .scan circle {
  fill: var(--accent-dark);
}

.viz-cells .cell {
  fill: var(--surface);
  stroke: #b7c4c1;
  stroke-width: 1.5;
  animation: cell-signal 3s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.viz-cells .cell.is-perturbed {
  fill: var(--warm);
  stroke: var(--warm);
  animation: none;
}

.viz-cells .ripple {
  fill: none;
  stroke: var(--warm);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ripple 3s ease-out infinite;
  animation-delay: var(--d, 0s);
}

.project-panel:not(.is-active) .viz *,
.project-panel:not(.is-active) .viz {
  animation-play-state: paused;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -26;
  }
}

@keyframes pulse-ring {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

@keyframes agent-think {
  0%,
  100% {
    fill: var(--surface);
  }
  50% {
    fill: var(--accent-soft);
  }
}

@keyframes draw-trace {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(275px);
  }
}

@keyframes cell-signal {
  0%,
  45%,
  100% {
    fill: var(--surface);
    stroke: #b7c4c1;
  }
  15% {
    fill: #f6e1d9;
    stroke: var(--warm);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(14);
  }
}

/* Scroll reveal (only when JS can undo it) */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Blog */

.blog-lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.04rem;
}

.post-list {
  display: grid;
  gap: 0.9rem;
}

.post-card {
  position: relative;
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.post-card:hover {
  border-color: rgba(11, 111, 104, 0.34);
  box-shadow: var(--shadow);
  color: var(--ink);
  transform: translateY(-2px);
}

.post-card strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.4rem;
  line-height: 1.2;
}

.post-excerpt {
  color: var(--muted);
}

.post-cta {
  margin-top: 0.3rem;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.post-cta span {
  display: inline-block;
  transition: transform 200ms ease;
}

.post-card:hover .post-cta span {
  transform: translateX(4px);
}

.post-back {
  display: inline-block;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.post-back:hover {
  color: var(--accent-dark);
}

.post-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.6rem;
  padding-bottom: 1.3rem;
}

.tab-panel .post-header h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.1;
}

.post-dek {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.45;
}

.post-header .post-meta {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.post-body {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.72;
}

.post-body p,
.post-body li {
  color: #3a4048;
}

.post-body p {
  margin: 0 0 1.05rem;
}

.post-body ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
}

.post-body li {
  margin-bottom: 0.55rem;
}

.post-body li strong,
.post-body p strong {
  color: var(--ink);
}

.tab-panel .post-body h3 {
  margin: 2.2rem 0 0.7rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem;
}

.cite {
  font-size: 0.82em;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.post-callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark) !important;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.55;
  padding: 0.85rem 1rem;
}

.modality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 0 1.1rem;
}

.modality {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.85rem 0.95rem;
}

.modality strong {
  display: block;
  margin: 0.15rem 0 0.25rem;
  color: var(--ink);
}

.modality p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.post-references {
  max-width: 720px;
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
  padding-top: 0.4rem;
}

.post-references ol {
  margin: 0;
  padding-left: 1.6rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.post-references li {
  margin-bottom: 0.5rem;
  border-radius: 4px;
  padding: 0.1rem 0.25rem;
  scroll-margin: 6rem;
}

.post-references a {
  overflow-wrap: anywhere;
}

.post-references li.is-flashed {
  animation: flash 1.6s ease;
}

@keyframes flash {
  0%,
  40% {
    background: var(--accent-soft);
  }
  100% {
    background: transparent;
  }
}

@media (max-width: 720px) {
  .levels {
    grid-template-columns: 1fr;
  }

  .level-link {
    height: 1.6rem;
  }

  .level-link span {
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 12px);
    background-size: 2px 24px;
    animation-name: link-flow-vertical;
  }

  .project-explorer {
    grid-template-columns: 1fr;
  }

  .project-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-tab {
    gap: 0;
    border-bottom: 0;
    padding: 0.7rem 0.4rem 0.75rem;
    text-align: center;
  }

  .project-tab + .project-tab {
    border-left: 1px solid var(--line);
  }

  .project-tab::before {
    top: auto;
    right: 0;
    width: auto;
    height: 3px;
    transform: scaleX(0);
  }

  .project-tab.is-active::before {
    transform: scaleX(1);
  }

  .project-acronym {
    font-size: clamp(0.92rem, 4vw, 1.08rem);
    overflow-wrap: anywhere;
  }

  .project-domain {
    font-size: 0.6rem;
  }

  .project-body {
    padding: 1rem;
  }

  .js .project-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 0.4rem 0.6rem;
  }

  .pager-button {
    width: 2.5rem;
    height: 2.5rem;
    appearance: none;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--accent-dark);
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
  }

  .pager-button:active {
    background: var(--accent-soft);
  }

  .pager-dots {
    display: flex;
    gap: 0.4rem;
  }

  .pager-dots i {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--line);
    transition:
      width 260ms ease,
      background-color 260ms ease;
  }

  .pager-dots i.is-active {
    width: 1.3rem;
    background: var(--accent);
  }

  .js .project-stage {
    touch-action: pan-y;
  }

  .modality-grid {
    grid-template-columns: 1fr;
  }

  .post-body {
    font-size: 1rem;
  }
}

@keyframes link-flow-vertical {
  to {
    background-position: 0 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .viz-time .trace {
    stroke-dashoffset: 0;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

.pub-note {
  margin: 0 0 1rem;
  color: var(--muted);
}
