:root {
  --paper: rgba(255, 251, 242, 0.92);
  --panel: rgba(255, 249, 241, 0.96);
  --panel-strong: rgba(252, 246, 236, 0.98);
  --ink: #1f2430;
  --muted: #66707d;
  --line: rgba(31, 36, 48, 0.14);
  --accent: #0e5e66;
  --accent-soft: rgba(14, 94, 102, 0.08);
  --gold: #a97724;
  --shadow: 0 24px 60px rgba(33, 37, 45, 0.12);
  --toggle-bg: rgba(252, 248, 240, 0.84);
  --toggle-border: rgba(31, 36, 48, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(169, 119, 36, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14, 94, 102, 0.16), transparent 26%),
    linear-gradient(180deg, #f6f1e7 0%, #ede3d3 100%);
  font-family: "Source Sans 3", "Avenir Next", sans-serif;
  transition:
    background 400ms ease,
    color 250ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.28));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(173, 23, 27, 0.22), transparent 24%),
    radial-gradient(circle at 80% 14%, rgba(123, 14, 24, 0.24), transparent 18%),
    radial-gradient(circle at 50% 82%, rgba(173, 23, 27, 0.2), transparent 26%);
  transition: opacity 400ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.2rem;
  padding: 0.72rem 0.92rem;
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  background: var(--toggle-bg);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(31, 38, 44, 0.12);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 250ms ease,
    color 250ms ease,
    border-color 250ms ease,
    transform 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle .icon-inline {
  width: 1.05rem;
  height: 1.05rem;
}

.equation-columns {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.equation-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(18vw, 220px);
  height: 100vh;
  padding-top: 5.8rem;
  padding-bottom: 2.2rem;
  color: rgba(31, 36, 48, 0.19);
  line-height: 1.2;
  transition: color 250ms ease;
}

.equation-side-left {
  align-items: center;
  padding-left: 1.2rem;
}

.equation-side-right {
  align-items: center;
  padding-right: 1.2rem;
}

.equation-line {
  display: block;
  max-width: 100%;
  width: 100%;
  text-align: center;
  white-space: normal;
  opacity: 0.95;
}

.equation-line mjx-container {
  margin: 0;
  overflow: visible;
}

.equation-line mjx-container[jax="SVG"] {
  color: inherit;
  font-size: clamp(0.72rem, 0.98vw, 0.95rem);
}

body.mind-page mjx-container:not([display="true"]) {
  display: inline-block !important;
}

.equation-side .equation-line:nth-child(2n) {
  transform: translateY(0.7rem);
}

.equation-side .equation-line:nth-child(3n) {
  transform: translateY(-0.35rem);
}

a {
  color: inherit;
  text-decoration: none;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.icon-inline svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

p,
li {
  line-height: 1.75;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2.4rem;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252, 248, 240, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(31, 38, 44, 0.08);
  transition:
    background-color 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.brand-name,
.site-nav a,
.eyebrow,
.section-kicker,
.proof-label,
.topic-index,
.timeline-year,
.detail-label,
.publication-type,
.publication-year {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  transform: translateX(-0.08rem);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.site-nav a.nav-mind {
  color: #8b4d17;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: 1.32fr 0.88fr;
  gap: 1.4rem;
  align-items: stretch;
}

.hero-copy,
.proof-card,
.trajectory-card,
.split-card,
.detail-card,
.topic-card,
.method-panel,
.publication-card,
.publication-note,
.timeline-item,
.academic-card,
.contact-card,
.publication-intro {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition:
    background-color 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  padding: 3rem;
  border-radius: 2rem;
}

.hero-intro {
  display: flow-root;
  align-items: start;
  margin-top: 0.65rem;
}

.eyebrow,
.section-kicker,
.proof-label,
.topic-index,
.timeline-year,
.detail-label,
.publication-type,
.publication-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.05;
}

h1 {
  margin-top: 0.8rem;
  font-size: clamp(3rem, 8vw, 5.9rem);
  max-width: 11ch;
}

h1 span {
  display: block;
  color: var(--gold);
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.hero-text {
  max-width: none;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-text p {
  margin: 0 0 1rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.hero-text p:last-child {
  margin-bottom: 0;
}

.portrait-placeholder {
  float: right;
  width: min(38%, 230px);
  margin: 0.15rem 0 1rem 1.6rem;
}

.portrait-frame {
  overflow: hidden;
  width: min(100%, 210px);
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(14, 94, 102, 0.16);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(169, 119, 36, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(14, 94, 102, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  color: var(--muted);
}

.portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.contact-links {
  margin-top: 1rem;
}

.button,
.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.2rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.contact-links a:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: #fffdf7;
}

.button-secondary,
.contact-links a {
  border: 1px solid rgba(31, 36, 48, 0.16);
  background: rgba(255, 255, 255, 0.42);
}

.hero-proof,
.hero-trajectory,
.detail-stack,
.journey-side {
  display: grid;
  gap: 1rem;
}

.proof-card,
.trajectory-card,
.method-panel,
.detail-card,
.publication-note,
.publication-intro,
.academic-card,
.contact-card {
  padding: 1.4rem 1.5rem;
  border-radius: 1.5rem;
}

.proof-card h2 {
  margin: 0.45rem 0 0.6rem;
  font-size: 1.75rem;
}

.detail-label-inline,
.section-title-inline {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.button .icon-inline {
  width: 1.15rem;
  height: 1.15rem;
}

.section-title-inline .icon-inline {
  width: 2.65rem;
  height: 2.65rem;
  margin-top: 0.12rem;
}

.trajectory-card {
  height: 100%;
  background:
    radial-gradient(circle at top right, rgba(169, 119, 36, 0.1), transparent 30%),
    var(--panel-strong);
}

.trajectory-track {
  position: relative;
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-left: 1.25rem;
}

.trajectory-track::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: 0.25rem;
  width: 1px;
  background: rgba(14, 94, 102, 0.18);
}

.trajectory-item {
  position: relative;
  padding-left: 1rem;
}

.trajectory-item::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: -0.1rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid rgba(14, 94, 102, 0.28);
  border-radius: 50%;
  background: rgba(255, 250, 244, 0.95);
  box-shadow: 0 0 0 5px rgba(14, 94, 102, 0.05);
}

.trajectory-year {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.trajectory-item h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.02;
}

.trajectory-item p:last-child {
  margin: 0.15rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.proof-card p,
.method-panel p,
.publication-note p,
.publication-intro p,
.academic-card p,
.contact-card p {
  margin: 0;
  color: var(--muted);
}

.compact-card {
  background: linear-gradient(135deg, rgba(14, 94, 102, 0.06), rgba(255, 255, 255, 0.55));
}

.accent-card {
  background:
    linear-gradient(135deg, rgba(14, 94, 102, 0.09), rgba(169, 119, 36, 0.14)),
    var(--panel);
}

.equation {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
  color: var(--ink);
}

.mini-list,
.tag-list,
.method-list {
  margin-top: 0.7rem;
}

.mini-list li,
.method-list li {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  padding-left: 0;
}

.tag-list li {
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(14, 94, 102, 0.14);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  line-height: 1.3;
}

.section {
  margin-top: clamp(1.4rem, 3vw, 2.1rem);
}

.interests-section {
  margin-top: 1.2rem;
}

.interests-card {
  padding: 1.7rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 1.8rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.interest-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.9rem;
}

.interest-group {
  --interest-accent: #0e5e66;
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1.2rem 1rem;
  border: 1px solid color-mix(in srgb, var(--interest-accent) 22%, var(--line));
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--interest-accent) 13%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--interest-accent) 7%, var(--panel)), var(--panel-strong));
  box-shadow: 0 12px 28px rgba(31, 38, 44, 0.05);
}

.interest-group::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--interest-accent);
  opacity: 0.78;
}

.interest-group-pavements {
  --interest-accent: #9a563d;
}

.interest-group-resilience {
  --interest-accent: #3e7084;
}

.interest-group-emerging {
  --interest-accent: #98702a;
}

.interest-group-heading {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid color-mix(in srgb, var(--interest-accent) 18%, transparent);
}

.interest-group-index {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--interest-accent) 24%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--interest-accent) 10%, transparent);
  color: var(--interest-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.interest-group h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  line-height: 1;
}

.interest-group ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.interest-group li {
  position: relative;
  padding: 0.68rem 0 0.68rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--interest-accent) 11%, transparent);
  color: var(--muted);
  line-height: 1.35;
}

.interest-group li:last-child {
  padding-bottom: 0.12rem;
  border-bottom: 0;
}

.interest-group li::before {
  content: "";
  position: absolute;
  top: 1.16rem;
  left: 0;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--interest-accent);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.34fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.section-heading {
  padding: 0.85rem 0.2rem 0.25rem;
}

.section-heading h2 {
  margin-top: 0.45rem;
  font-size: clamp(2.55rem, 4.6vw, 3.75rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
}

.publication-section {
  display: block;
}

.publication-shell {
  scroll-margin-top: 6.5rem;
  padding: 1.7rem 1.8rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 1.9rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.publication-section .section-heading {
  padding: 0 0 1rem;
}

.publication-section .section-heading h2 {
  max-width: none;
  font-size: clamp(2.15rem, 3.5vw, 2.9rem);
  line-height: 1;
}

.profile-grid,
.research-layout,
.journey-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.72fr;
  gap: 1rem;
}

.split-card {
  display: grid;
  grid-template-columns: 1.2fr 0.82fr;
  gap: 1.8rem;
  padding: 2rem;
  border-radius: 1.8rem;
}

.quote-panel {
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(14, 94, 102, 0.08), rgba(169, 119, 36, 0.08));
}

.quote-label {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.quote-text {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--ink);
}

.definition-list {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.definition-list div {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.definition-list dt {
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.definition-list dd {
  margin: 0;
  color: var(--muted);
}

.research-grid,
.academic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.topic-card,
.academic-card {
  min-height: 100%;
  padding: 1.6rem;
  border-radius: 1.55rem;
}

.topic-card h3,
.academic-card h3,
.publication-card h3 {
  margin: 0.55rem 0 0.75rem;
  font-size: 2rem;
}

.topic-card p:last-child,
.academic-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.method-panel {
  background:
    radial-gradient(circle at top right, rgba(169, 119, 36, 0.1), transparent 30%),
    var(--panel-strong);
}

.publication-panel {
  display: grid;
  gap: 1.15rem;
}

.publication-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 1.2rem;
  padding: 1.35rem 1.4rem;
  border-radius: 1.5rem;
  align-items: start;
}

.publication-year {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.2rem;
  color: var(--gold);
  font-weight: 700;
}

.publication-type {
  margin: 0;
}

.publication-meta {
  color: var(--muted);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--ink);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-radius: 1.5rem;
  align-items: start;
}

.timeline-content h3 {
  font-size: 1.8rem;
}

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

.contact-section {
  padding-top: 0.8rem;
}

.contact-card {
  padding: 2rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at top right, rgba(169, 119, 36, 0.16), transparent 22%),
    var(--panel);
}

.contact-card h2 {
  margin-top: 0.4rem;
  font-size: clamp(2.15rem, 3.5vw, 2.9rem);
  line-height: 1;
}

.contact-intro {
  margin-top: 0.85rem;
  margin-bottom: 1.8rem;
}

.mind-feature,
.mind-reference,
.mind-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.mind-opening {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.62fr);
  gap: 0;
  align-items: stretch;
  border: 1px solid rgba(20, 118, 126, 0.18);
  border-radius: 2.2rem;
  background:
    radial-gradient(circle at 14% 18%, rgba(244, 138, 74, 0.22), transparent 24%),
    radial-gradient(circle at 82% 22%, rgba(30, 156, 147, 0.14), transparent 22%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    var(--panel);
  box-shadow: 0 28px 80px rgba(44, 54, 70, 0.14);
  overflow: hidden;
}

.mind-heading,
.mind-aside,
.mind-feature,
.mind-reference,
.mind-card {
  padding: 1.6rem 1.7rem;
  border-radius: 1.7rem;
}

.mind-heading {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.4rem 2.55rem 2.2rem;
  border-radius: 0;
}

.mind-page-title {
  margin-top: 0.55rem;
  font-size: clamp(3.1rem, 6vw, 4.8rem);
  line-height: 0.95;
  max-width: none;
  text-wrap: balance;
}

.mind-page-intro {
  max-width: none;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2rem 2rem 2.15rem;
  border-radius: 0;
  border-left: 1px solid rgba(20, 118, 126, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(255, 229, 203, 0.7), rgba(228, 247, 244, 0.76));
}

.mind-aside .detail-label {
  margin-bottom: 0.8rem;
}

.mind-preface-pill {
  display: inline-block;
  width: fit-content;
  margin: 0 0 1rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid rgba(20, 118, 126, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mind-aside p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.chaos-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
  padding: 0.78rem 0.96rem;
  border: 1px solid rgba(14, 94, 102, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.chaos-toggle-nav {
  margin-top: 0;
  margin-left: 0.15rem;
  padding: 0.56rem 0.82rem;
  font-size: 0.72rem;
  line-height: 1;
  flex: 0 0 auto;
  align-self: center;
  transform: translateY(0.02rem);
}

.chaos-toggle:hover {
  transform: translateY(-2px);
}

.chaos-toggle .icon-inline {
  width: 1.05rem;
  height: 1.05rem;
}

.chaos-char,
.chaos-math,
.chaos-image-piece {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  white-space: pre;
  overflow: visible;
  transform-origin: center;
  transition:
    transform 1200ms cubic-bezier(0.18, 0.84, 0.24, 1),
    opacity 1200ms ease;
  will-change: transform;
}

.chaos-overlay {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.chaos-image-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

.chaos-image-frame {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.chaos-source {
  position: relative;
}

.chaos-source-image {
  transition: opacity 60ms linear;
}

body.chaos-mode .chaos-source {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

body.chaos-restoring .chaos-source {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

body.chaos-mode .chaos-source-image,
body.chaos-restoring .chaos-source-image {
  opacity: 0 !important;
}

body.chaos-mode .chaos-source-pill,
body.chaos-restoring .chaos-source-pill {
  color: var(--chaos-pill-color) !important;
  -webkit-text-fill-color: var(--chaos-pill-text-fill) !important;
  background: var(--chaos-pill-background) !important;
  border-color: var(--chaos-pill-border) !important;
}

body.chaos-mode .chaos-source .icon-inline,
body.chaos-mode .chaos-source .icon-inline svg,
body.chaos-mode .chaos-source .chaos-origin-math-a11y {
  opacity: 0;
}

body.chaos-restoring .chaos-source .icon-inline,
body.chaos-restoring .chaos-source .icon-inline svg,
body.chaos-restoring .chaos-source .chaos-origin-math-a11y {
  opacity: 0;
}

body.chaos-mode .chaos-char,
body.chaos-mode .chaos-math,
body.chaos-mode .chaos-origin-math,
body.chaos-mode .chaos-image-piece {
  transform:
    translate(var(--chaos-x, 0px), var(--chaos-y, 0px))
    rotate(var(--chaos-rot, 0deg))
    scale(var(--chaos-scale, 1.12));
  opacity: 1;
}

.chaos-origin-math {
  transition:
    transform 1200ms cubic-bezier(0.18, 0.84, 0.24, 1),
    opacity 1200ms ease;
  will-change: transform;
  transform-origin: center;
}

.chaos-source-pill {
  transition:
    transform 1200ms cubic-bezier(0.18, 0.84, 0.24, 1),
    opacity 1200ms ease;
  will-change: transform;
  transform-origin: center;
}

body.chaos-mode .chaos-source-pill {
  transform:
    translate(var(--chaos-x, 0px), var(--chaos-y, 0px))
    rotate(var(--chaos-rot, 0deg))
    scale(var(--chaos-scale, 1.12));
}

.chaos-image-piece {
  background-repeat: no-repeat;
  backface-visibility: hidden;
  box-shadow: none;
  z-index: 1;
}

.chaos-math mjx-container {
  display: block !important;
  margin: 0;
  opacity: 1;
  vertical-align: top !important;
}

body.chaos-mode .chaos-overlay mjx-container,
body.chaos-restoring .chaos-overlay mjx-container {
  opacity: 1 !important;
}

body.chaos-mode .mind-feature,
body.chaos-mode .mind-reference,
body.chaos-mode .mind-card,
body.chaos-mode .mind-heading,
body.chaos-mode .mind-aside {
  overflow: visible;
}

body.mind-page {
  overflow-y: scroll;
}

body.mind-page.chaos-mode,
body.mind-page.chaos-restoring {
  overflow-x: clip;
}

body.chaos-mode .chaos-toggle {
  background: rgba(14, 94, 102, 0.12);
  border-color: rgba(14, 94, 102, 0.28);
}

.mind-theme-browser {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.45fr);
  gap: 1.4rem;
  align-items: center;
  margin-top: 1.35rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(35, 74, 104, 0.17);
  border-radius: 1.7rem;
  background:
    radial-gradient(circle at 5% 12%, rgba(22, 140, 145, 0.12), transparent 26%),
    radial-gradient(circle at 95% 10%, rgba(214, 111, 82, 0.11), transparent 23%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(250, 244, 232, 0.72));
  box-shadow: 0 16px 40px rgba(72, 66, 54, 0.09);
}

.mind-theme-copy .detail-label {
  margin: 0;
}

.mind-theme-copy h2 {
  margin: 0.34rem 0 0;
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  line-height: 1;
}

.mind-theme-copy > p:last-child {
  margin: 0.58rem 0 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.5;
}

.mind-theme-interface {
  min-width: 0;
}

.mind-theme-controls {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 0.5rem;
  justify-content: start;
}

.mind-theme-button {
  --theme-color: #324e63;
  --theme-soft: rgba(50, 78, 99, 0.09);
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.45rem;
  padding: 0.5rem 0.68rem;
  border: 1px solid color-mix(in srgb, var(--theme-color) 24%, transparent);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.mind-theme-button[data-theme="ai"] {
  --theme-color: #c65f41;
  --theme-soft: rgba(198, 95, 65, 0.1);
}

.mind-theme-button[data-theme="math"] {
  --theme-color: #14777c;
  --theme-soft: rgba(20, 119, 124, 0.1);
}

.mind-theme-button[data-theme="physics"] {
  --theme-color: #3d68a2;
  --theme-soft: rgba(61, 104, 162, 0.1);
}

.mind-theme-button[data-theme="asphalt"] {
  --theme-color: #9b6b18;
  --theme-soft: rgba(155, 107, 24, 0.1);
}

.mind-theme-button[data-theme="people"] {
  --theme-color: #98576d;
  --theme-soft: rgba(152, 87, 109, 0.1);
}

.mind-theme-button:hover {
  border-color: color-mix(in srgb, var(--theme-color) 46%, transparent);
  background: var(--theme-soft);
  transform: translateY(-1px);
}

.mind-theme-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--theme-color) 36%, transparent);
  outline-offset: 3px;
}

.mind-theme-button[aria-pressed="true"] {
  border-color: var(--theme-color);
  background: var(--theme-color);
  color: #fffdf8;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--theme-color) 22%, transparent);
  transform: translateY(-1px);
}

.mind-theme-mark {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--theme-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-color) 38%, transparent);
}

.mind-theme-button[aria-pressed="true"] .mind-theme-mark {
  background: #fffdf8;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.mind-theme-count {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--theme-soft);
  color: var(--theme-color);
  font-size: 0.65rem;
}

.mind-theme-button[aria-pressed="true"] .mind-theme-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fffdf8;
}

.mind-theme-status {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.025em;
  text-align: right;
}

.mind-layout {
  --mind-card-gap: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--mind-card-gap);
  row-gap: var(--mind-card-gap);
  margin-top: 1.5rem;
}

.mind-layout.is-masonry-ready {
  grid-auto-flow: dense;
  grid-auto-rows: 1px;
  row-gap: 0;
  align-items: start;
}

.mind-layout.is-masonry-ready > [data-themes] {
  align-self: start;
}

.mind-layout.is-filtered {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mind-layout.is-filtered > [data-themes] {
  grid-column: auto;
  grid-row: auto;
  height: fit-content !important;
}

.mind-layout.is-filtered > .mind-card-wide,
.mind-layout.is-filtered > .mind-feature,
.mind-layout.is-filtered > .mind-note-card,
.mind-layout.is-filtered > .mind-graph-note {
  grid-column: 1 / -1;
}

.mind-layout > [data-themes][hidden] {
  display: none !important;
}

.theme-card-pop {
  animation: theme-card-pop 480ms cubic-bezier(0.2, 0.72, 0.22, 1) both;
}

@keyframes theme-card-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.988);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mind-feature {
  grid-column: 1 / -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(14, 94, 102, 0.025)),
    var(--panel);
}

.mind-feature-top {
  margin: -1.6rem -1.7rem 1.35rem;
  padding: 1rem 1.7rem 0.95rem;
  border-bottom: 1px solid rgba(14, 94, 102, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 94, 102, 0.06), rgba(14, 94, 102, 0.02)),
    rgba(255, 255, 255, 0.38);
  border-top-left-radius: 1.7rem;
  border-top-right-radius: 1.7rem;
}

.mind-feature-top .detail-label,
.mind-reference > .detail-label:first-child,
.mind-card > .detail-label:first-child {
  margin: 0;
}

.mind-feature-meta {
  display: flex;
  justify-content: flex-end;
  margin: -0.35rem 0 0.95rem;
}

.mind-chip {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(14, 94, 102, 0.15);
  border-radius: 999px;
  background: rgba(14, 94, 102, 0.06);
  color: var(--accent);
  font-size: 0.8rem;
  line-height: 1.2;
}

.mind-feature-title {
  margin-top: 0.7rem;
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  line-height: 1;
  max-width: none;
  text-wrap: pretty;
}

.mind-copy {
  column-count: 2;
  column-gap: 1.6rem;
  margin-top: 1rem;
}

.mind-copy p {
  margin: 0 0 1rem;
  break-inside: avoid;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-inline-reference {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 118, 126, 0.16);
}

.mind-inline-reference p {
  margin: 0;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-inline-reference .mind-link {
  display: inline;
}

.mind-reference {
  background:
    radial-gradient(circle at top, rgba(169, 119, 36, 0.12), transparent 32%),
    var(--panel-strong);
}

.mind-reference > .detail-label:first-child,
.mind-card > .detail-label:first-child {
  display: block;
  margin: -1.6rem -1.7rem 1.25rem;
  padding: 1rem 1.7rem 0.95rem;
  border-bottom: 1px solid rgba(14, 94, 102, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 94, 102, 0.055), rgba(14, 94, 102, 0.015)),
    rgba(255, 255, 255, 0.34);
  border-top-left-radius: 1.7rem;
  border-top-right-radius: 1.7rem;
}

.mind-reference h2 {
  margin-top: 0.45rem;
  font-size: 2rem;
}

.mind-reference p {
  margin: 0.7rem 0 1rem;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--ink);
}

.mind-card {
  min-height: 180px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(14, 94, 102, 0.02)),
    var(--panel);
}

.mind-note-card {
  grid-column: span 2;
  min-height: 0;
}

.mind-compact-note {
  min-height: 0;
}

.mind-dirac-note,
.mind-reading-note {
  align-self: start;
  height: fit-content;
}

.mind-graph-note {
  grid-column: 1;
}

.mind-dirac-note {
  grid-column: 2;
}

.mind-reading-note {
  grid-column: 3;
}

.mind-eddington-note {
  grid-column: 2;
  align-self: start;
  height: fit-content;
}

.mind-note-card h2 {
  margin-top: 0.45rem;
  margin-bottom: 1rem;
  font-size: 2.1rem;
}

.mind-compact-note h2 {
  margin-top: 0.45rem;
  font-size: 1.9rem;
  line-height: 1.02;
}

.mind-compact-note p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-compact-image {
  display: block;
  width: min(100%, 320px);
  margin: 0.95rem auto 0.85rem;
  border: 1px solid rgba(20, 118, 126, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 32px rgba(54, 61, 78, 0.12);
}

.mind-compact-note p:last-child {
  margin-top: 0.75rem;
}

.mind-formula {
  margin: 0.9rem 0;
  text-align: center;
}

.mind-note-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.2rem;
  align-items: start;
}

.mind-note-copy p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-note-copy {
  min-width: 0;
}

.mind-note-copy p:last-child {
  margin-bottom: 0;
}

.mind-note-copy .mind-link {
  display: inline;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mind-note-reference {
  margin-top: 0.25rem;
  font-size: 0.96rem;
  color: var(--soft-ink);
}

.mind-note-title {
  font-style: italic;
}

.mind-note-image {
  width: 220px;
  aspect-ratio: 4 / 5;
  margin: 0.1rem 0 0;
  border: 1px solid rgba(20, 118, 126, 0.16);
  border-radius: 1.1rem;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(54, 61, 78, 0.14);
  justify-self: end;
  order: 2;
}

.mind-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-card-empty {
  position: relative;
}

.mind-card-empty::after {
  content: "";
  position: absolute;
  left: 1.7rem;
  right: 1.7rem;
  bottom: 1.45rem;
  height: 1px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(31, 36, 48, 0.18) 0 10px,
      transparent 10px 18px
    );
  opacity: 0.45;
}

.mind-card-wide {
  grid-column: span 3;
  min-height: 220px;
}

body.mind-page .mind-card-wide.mind-ai2040-note {
  --ai2040-blue: #234a68;
  --ai2040-cyan: #168c91;
  --ai2040-coral: #d66f52;
  --ai2040-gold: #d2a33b;
  overflow: hidden;
  border-color: rgba(35, 74, 104, 0.2);
  background:
    radial-gradient(circle at 8% 5%, rgba(22, 140, 145, 0.16), transparent 23%),
    radial-gradient(circle at 94% 8%, rgba(214, 111, 82, 0.15), transparent 21%),
    linear-gradient(145deg, rgba(247, 252, 249, 0.98), rgba(251, 246, 235, 0.94));
}

.mind-ai2040-note h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.85rem, 3.7vw, 3.1rem);
  line-height: 0.98;
  color: var(--ai2040-blue);
  white-space: nowrap;
}

.ai2040-heading-row {
  position: relative;
  display: block;
}

.ai2040-intro {
  max-width: none;
  margin: 1rem 0 0;
  padding-right: 8.4rem;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.ai2040-source {
  position: absolute;
  right: 0;
  bottom: 0.02rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.36rem 0.7rem;
  border: 1px solid rgba(35, 74, 104, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ai2040-blue);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  justify-self: end;
}

.ai2040-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.ai2040-timeline::before {
  content: "";
  position: absolute;
  top: 2.69rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--ai2040-cyan),
    var(--ai2040-gold) 55%,
    var(--ai2040-coral)
  );
  opacity: 0.62;
}

.ai2040-timeline li {
  position: relative;
  min-width: 0;
  padding: 0.75rem 0.82rem 0.85rem;
  border: 1px solid rgba(35, 74, 104, 0.13);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.52);
}

.ai2040-timeline li::before {
  content: "";
  position: absolute;
  top: 2.35rem;
  left: 50%;
  z-index: 1;
  width: 0.72rem;
  height: 0.72rem;
  margin: 0;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--ai2040-cyan);
  box-shadow: 0 0 0 1px rgba(35, 74, 104, 0.2);
  transform: translateX(-50%);
}

.ai2040-timeline li:nth-child(2)::before,
.ai2040-timeline li:nth-child(3)::before {
  background: var(--ai2040-gold);
}

.ai2040-timeline li:last-child::before {
  background: var(--ai2040-coral);
}

.ai2040-year {
  display: block;
  color: var(--ai2040-coral);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
}

.ai2040-stage-title,
.ai2040-pillar-title {
  color: var(--ai2040-blue);
  font-weight: 800;
}

.ai2040-stage-title {
  margin: 2.15rem 0 0;
  text-align: center;
}

.ai2040-timeline li > p:last-child {
  margin: 0.48rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
  text-align: center;
}

.ai2040-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: stretch;
  margin-top: 1rem;
}

.ai2040-pillar {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0.65rem;
  align-content: start;
  padding: 1rem 1rem 0.95rem;
  border-radius: 1rem;
  background: rgba(35, 74, 104, 0.065);
}

.ai2040-pillar-index {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  color: var(--ai2040-coral);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.5rem;
  letter-spacing: 0.08em;
}

.ai2040-pillar-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  line-height: 1.5rem;
}

.ai2040-pillar > p:last-child {
  grid-column: 2;
  grid-row: 2;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.ai2040-risks {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(214, 111, 82, 0.16);
  border-radius: 1rem;
  background: rgba(214, 111, 82, 0.055);
}

.ai2040-risks-label {
  margin: 0;
  color: var(--ai2040-blue);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai2040-risks ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai2040-risks li {
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(35, 74, 104, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.ai2040-reflection {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem 0.9rem 1.15rem;
  border-left: 3px solid var(--ai2040-cyan);
  background: linear-gradient(90deg, rgba(22, 140, 145, 0.075), transparent 72%);
  color: var(--muted);
  font-style: italic;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

@media (max-width: 780px) {
  .ai2040-heading-row,
  .ai2040-pillars,
  .ai2040-risks {
    grid-template-columns: 1fr;
  }

  .ai2040-source {
    position: static;
    margin-top: 0.6rem;
  }

  .ai2040-intro {
    padding-right: 0;
  }

  .mind-ai2040-note h2 {
    white-space: normal;
  }

  .ai2040-timeline {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-left: 1.55rem;
  }

  .ai2040-timeline::before {
    top: 1rem;
    bottom: 1rem;
    left: 0.48rem;
    right: auto;
    width: 2px;
    height: auto;
  }

  .ai2040-timeline li::before {
    top: 1rem;
    left: -1.47rem;
    transform: none;
  }

  .ai2040-year,
  .ai2040-stage-title,
  .ai2040-timeline li > p:last-child {
    text-align: left;
  }

  .ai2040-stage-title {
    margin-top: 0.25rem;
  }

  .ai2040-risks ul {
    justify-content: flex-start;
  }
}

.mind-methods-list {
  margin: 1.2rem 0 0;
  padding-left: 1.45rem;
  display: grid;
  gap: 0;
}

.mind-methods-list li {
  display: grid;
  gap: 0.36rem;
  padding: 0.8rem 0 0.8rem 0.4rem;
  border-bottom: 1px solid rgba(20, 118, 126, 0.12);
}

.mind-methods-list h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.mind-methods-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.mind-methods-list p strong {
  display: inline-block;
  min-width: 8.8rem;
}

.mind-methods-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mind-play {
  margin-top: 1.3rem;
}

.mind-play-card {
  padding: 1.7rem 1.8rem 1.8rem;
  border: 1px solid rgba(20, 118, 126, 0.18);
  border-radius: 1.9rem;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 170, 87, 0.18), transparent 18%),
    radial-gradient(circle at 84% 22%, rgba(37, 150, 168, 0.14), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.12)),
    var(--panel);
  box-shadow: var(--shadow);
}

.mind-play-card h2 {
  margin-top: 0.45rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.mind-play-intro,
.mind-play-status {
  margin: 0.8rem 0 0;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
}

body.mind-page.chaos-mode .chaos-source,
body.mind-page.chaos-restoring .chaos-source {
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

.mind-play-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.32fr) minmax(160px, 0.26fr);
  align-items: end;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.mind-play-input-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.mind-play-label {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  line-height: 1.1;
}

.mind-play-input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(20, 118, 126, 0.18);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.mind-play-input:focus {
  outline: 2px solid rgba(15, 138, 131, 0.22);
  outline-offset: 2px;
}

.mind-play-button,
.mind-play-reset {
  align-self: end;
}

.mind-play-status {
  min-height: 1.6rem;
  margin-top: 1rem;
}

.back-top-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.35rem;
}

.back-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 0.98rem;
  border: 1px solid rgba(31, 36, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 28px rgba(31, 38, 44, 0.08);
  transition:
    transform 180ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.back-top-link:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 118, 126, 0.22);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px rgba(31, 38, 44, 0.12);
}

.back-top-link .icon-inline {
  width: 0.98rem;
  height: 0.98rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem 1.2rem;
  margin-top: 1.4rem;
  padding: 1rem 0.1rem 0;
  border-top: 1px solid rgba(31, 36, 48, 0.1);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

body.is-upside-down {
  --paper: rgba(16, 8, 10, 0.95);
  --panel: rgba(34, 13, 18, 0.95);
  --panel-strong: rgba(47, 15, 22, 0.98);
  --ink: #f6e2da;
  --muted: #d7aca2;
  --line: rgba(232, 99, 88, 0.16);
  --accent: #f04d4d;
  --accent-soft: rgba(240, 77, 77, 0.14);
  --gold: #ff8b72;
  --shadow: 0 28px 78px rgba(0, 0, 0, 0.52);
  --toggle-bg: rgba(55, 15, 20, 0.88);
  --toggle-border: rgba(240, 77, 77, 0.34);
}

body.is-upside-down {
  background:
    radial-gradient(circle at 18% 14%, rgba(187, 28, 35, 0.34), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(115, 13, 23, 0.34), transparent 18%),
    radial-gradient(circle at 52% 78%, rgba(167, 26, 34, 0.28), transparent 28%),
    linear-gradient(180deg, #090506 0%, #19090d 48%, #0a0507 100%);
}

body.is-upside-down::before {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(240, 77, 77, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 77, 77, 0.12) 1px, transparent 1px);
}

body.is-upside-down::after {
  opacity: 1;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 70, 62, 0.22), transparent 18%),
    radial-gradient(circle at 85% 14%, rgba(194, 22, 32, 0.22), transparent 16%),
    radial-gradient(circle at 78% 74%, rgba(130, 18, 24, 0.24), transparent 22%),
    radial-gradient(circle at 28% 80%, rgba(255, 93, 76, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(23, 7, 10, 0.2), rgba(23, 7, 10, 0.38));
}

body.is-upside-down .equation-side {
  color: rgba(244, 212, 203, 0.18);
}

body.is-upside-down .site-header {
  background: rgba(38, 11, 16, 0.84);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

body.is-upside-down .theme-toggle {
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(240, 77, 77, 0.1), 0 12px 26px rgba(0, 0, 0, 0.3);
}

body.is-upside-down .button-primary {
  background: linear-gradient(180deg, #9f191e, #6e1015);
  color: #fff4ef;
}

body.is-upside-down .button-secondary,
body.is-upside-down .contact-links a {
  background: rgba(77, 18, 24, 0.58);
  border-color: rgba(240, 77, 77, 0.22);
}

body.is-upside-down .site-nav a,
body.is-upside-down .brand-name {
  color: #f2d3ca;
}

body.is-upside-down .site-nav a.nav-mind {
  color: #ffb36b;
}

body.is-upside-down .portrait-frame {
  background:
    radial-gradient(circle at top, rgba(240, 77, 77, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(240, 77, 77, 0.1));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 28px rgba(167, 26, 34, 0.14);
}

body.is-upside-down .portrait-monogram {
  background: rgba(38, 16, 20, 0.86);
}

body.is-upside-down .trajectory-card,
body.is-upside-down .hero-copy,
body.is-upside-down .interests-card,
body.is-upside-down .publication-card,
body.is-upside-down .contact-card {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.mind-page,
body.mind-page.is-upside-down {
  --paper: rgba(255, 248, 241, 0.95);
  --panel: rgba(255, 245, 235, 0.97);
  --panel-strong: rgba(255, 237, 223, 0.99);
  --ink: #1e2531;
  --muted: #596878;
  --line: rgba(25, 102, 116, 0.18);
  --accent: #0f8a83;
  --accent-soft: rgba(15, 138, 131, 0.12);
  --gold: #d85d36;
  --shadow: 0 28px 78px rgba(35, 47, 62, 0.15);
  --toggle-bg: rgba(255, 241, 227, 0.92);
  --toggle-border: rgba(25, 102, 116, 0.16);
  background:
    radial-gradient(circle at 10% 12%, rgba(240, 119, 65, 0.28), transparent 22%),
    radial-gradient(circle at 88% 16%, rgba(18, 155, 146, 0.24), transparent 20%),
    radial-gradient(circle at 78% 86%, rgba(64, 139, 205, 0.18), transparent 28%),
    radial-gradient(circle at 34% 72%, rgba(246, 181, 77, 0.14), transparent 22%),
    linear-gradient(180deg, #fff3e6 0%, #f8e5d7 52%, #f3d8cd 100%);
}

body.mind-page::before,
body.mind-page.is-upside-down::before {
  opacity: 0.38;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
}

body.mind-page::after,
body.mind-page.is-upside-down::after {
  opacity: 1;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 154, 90, 0.24), transparent 16%),
    radial-gradient(circle at 84% 16%, rgba(33, 162, 158, 0.2), transparent 18%),
    radial-gradient(circle at 42% 82%, rgba(209, 104, 57, 0.18), transparent 20%),
    radial-gradient(circle at 66% 44%, rgba(247, 193, 92, 0.12), transparent 16%);
}

body.mind-page .equation-side,
body.mind-page.is-upside-down .equation-side {
  color: rgba(23, 87, 105, 0.24);
}

body.mind-page .site-header,
body.mind-page.is-upside-down .site-header {
  background: rgba(255, 244, 234, 0.84);
  box-shadow: 0 16px 42px rgba(92, 72, 56, 0.12);
}

body.mind-page .site-nav a.nav-mind,
body.mind-page.is-upside-down .site-nav a.nav-mind {
  color: #cf5a2b;
}

body.mind-page .chaos-toggle-nav,
body.mind-page.is-upside-down .chaos-toggle-nav {
  border-color: rgba(211, 91, 47, 0.24);
  background:
    linear-gradient(90deg, rgba(255, 228, 197, 0.96), rgba(255, 241, 225, 0.96)),
    rgba(255, 255, 255, 0.72);
  color: #b64c28;
  box-shadow: 0 10px 24px rgba(161, 92, 56, 0.12);
}

body.mind-page .chaos-toggle-nav:hover,
body.mind-page.is-upside-down .chaos-toggle-nav:hover {
  border-color: rgba(15, 138, 131, 0.24);
  color: #0f7b79;
}

body.mind-page .mind-heading,
body.mind-page.is-upside-down .mind-heading {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 177, 66, 0.14), transparent 18%),
    radial-gradient(circle at 84% 20%, rgba(114, 144, 255, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(16, 24, 52, 0.98), rgba(21, 33, 74, 0.96) 52%, rgba(29, 46, 97, 0.94));
  color: #fff8ef;
}

body.mind-page .mind-aside,
body.mind-page.is-upside-down .mind-aside {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    linear-gradient(145deg, rgba(243, 198, 112, 0.96), rgba(235, 170, 92, 0.92) 42%, rgba(243, 224, 185, 0.88));
  border-left-color: rgba(243, 189, 91, 0.34);
  color: #2d190f;
}

body.mind-page .mind-opening,
body.mind-page.is-upside-down .mind-opening {
  border-color: rgba(24, 35, 82, 0.44);
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 170, 52, 0.16), transparent 18%),
    radial-gradient(circle at 88% 16%, rgba(117, 146, 255, 0.14), transparent 24%),
    linear-gradient(145deg, rgba(10, 15, 35, 0.98), rgba(15, 24, 56, 0.98) 54%, rgba(26, 38, 79, 0.96));
  box-shadow: 0 34px 98px rgba(20, 26, 54, 0.34);
}

body.mind-page .mind-opening .section-kicker,
body.mind-page.is-upside-down .mind-opening .section-kicker {
  color: rgba(255, 217, 156, 0.96);
}

body.mind-page .mind-page-title,
body.mind-page.is-upside-down .mind-page-title {
  color: #fffaf4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

body.mind-page .mind-page-intro,
body.mind-page.is-upside-down .mind-page-intro {
  color: rgba(247, 241, 232, 0.92);
}

body.mind-page .mind-opening .detail-label,
body.mind-page.is-upside-down .mind-opening .detail-label {
  color: rgba(88, 43, 18, 0.96);
}

body.mind-page .mind-preface-pill,
body.mind-page.is-upside-down .mind-preface-pill {
  border-color: rgba(88, 48, 22, 0.22);
  background: rgba(255, 248, 236, 0.64);
  color: #4f2b16;
}

body.mind-page .mind-aside p:last-child,
body.mind-page.is-upside-down .mind-aside p:last-child {
  color: rgba(48, 28, 16, 0.92);
}

body.mind-page .mind-opening .section-kicker,
body.mind-page.is-upside-down .mind-opening .section-kicker {
  color: rgba(255, 217, 156, 0.96);
}

body.mind-page .mind-aside .detail-label,
body.mind-page.is-upside-down .mind-aside .detail-label {
  color: rgba(88, 43, 18, 0.96);
}

body.mind-page .mind-page-title,
body.mind-page.is-upside-down .mind-page-title {
  color: #fffaf4;
}

body.mind-page .mind-page-intro,
body.mind-page.is-upside-down .mind-page-intro {
  color: rgba(247, 241, 232, 0.92);
}

body.mind-page .mind-aside p:last-child,
body.mind-page.is-upside-down .mind-aside p:last-child {
  color: rgba(48, 28, 16, 0.92);
}

body.mind-page .mind-feature,
body.mind-page.is-upside-down .mind-feature {
  background:
    radial-gradient(circle at 10% 12%, rgba(245, 155, 89, 0.14), transparent 20%),
    radial-gradient(circle at 82% 18%, rgba(28, 158, 153, 0.11), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(15, 138, 131, 0.035)),
    var(--panel);
}

body.mind-page .back-top-link,
body.mind-page.is-upside-down .back-top-link {
  border-color: rgba(57, 92, 177, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 234, 204, 0.9), rgba(255, 245, 231, 0.92)),
    rgba(255, 255, 255, 0.6);
  color: #b24d25;
  box-shadow: 0 14px 32px rgba(87, 73, 60, 0.12);
}

body.mind-page .back-top-link:hover,
body.mind-page.is-upside-down .back-top-link:hover {
  border-color: rgba(32, 125, 138, 0.24);
  background:
    linear-gradient(90deg, rgba(255, 223, 183, 0.96), rgba(255, 243, 227, 0.98)),
    rgba(255, 255, 255, 0.72);
  color: #0f7b79;
}

body.mind-page .mind-reference,
body.mind-page.is-upside-down .mind-reference {
  background:
    radial-gradient(circle at top, rgba(237, 155, 73, 0.24), transparent 32%),
    radial-gradient(circle at bottom right, rgba(27, 145, 138, 0.11), transparent 24%),
    var(--panel-strong);
}

body.mind-page .mind-card,
body.mind-page.is-upside-down .mind-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(19, 120, 129, 0.03)),
    var(--panel);
}

body.mind-page .mind-card:not(.mind-card-wide),
body.mind-page.is-upside-down .mind-card:not(.mind-card-wide) {
  background:
    radial-gradient(circle at 82% 16%, rgba(245, 143, 93, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(19, 120, 129, 0.03)),
    var(--panel);
}

body.mind-page .mind-card-wide,
body.mind-page.is-upside-down .mind-card-wide {
  background:
    radial-gradient(circle at 16% 20%, rgba(28, 158, 153, 0.13), transparent 20%),
    radial-gradient(circle at 84% 22%, rgba(245, 171, 69, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(19, 120, 129, 0.03)),
    var(--panel);
}

body.mind-page .mind-feature-top,
body.mind-page .mind-reference > .detail-label:first-child,
body.mind-page .mind-card > .detail-label:first-child,
body.mind-page.is-upside-down .mind-feature-top,
body.mind-page.is-upside-down .mind-reference > .detail-label:first-child,
body.mind-page.is-upside-down .mind-card > .detail-label:first-child {
  border-bottom-color: rgba(20, 118, 126, 0.18);
  background:
    linear-gradient(90deg, rgba(244, 138, 74, 0.11), rgba(20, 145, 138, 0.08) 48%, rgba(247, 193, 92, 0.1)),
    rgba(255, 255, 255, 0.44);
}

body.mind-page .mind-chip,
body.mind-page.is-upside-down .mind-chip {
  border-color: rgba(20, 145, 138, 0.22);
  background: linear-gradient(90deg, rgba(20, 145, 138, 0.12), rgba(247, 193, 92, 0.12));
  color: #0f6f72;
}

body.mind-page .mind-link,
body.mind-page.is-upside-down .mind-link {
  color: #c7512a;
}

body.mind-page .chaos-toggle,
body.mind-page.is-upside-down .chaos-toggle {
  border-color: rgba(20, 145, 138, 0.24);
  background: linear-gradient(90deg, rgba(255, 245, 236, 0.92), rgba(240, 250, 247, 0.92));
  box-shadow: 0 10px 24px rgba(76, 70, 56, 0.08);
}

body.mind-page .mind-play-card,
body.mind-page.is-upside-down .mind-play-card {
  border-color: rgba(108, 94, 186, 0.18);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 164, 76, 0.2), transparent 18%),
    radial-gradient(circle at 86% 18%, rgba(76, 110, 214, 0.14), transparent 18%),
    linear-gradient(135deg, rgba(255, 244, 210, 0.62), rgba(235, 243, 255, 0.46)),
    var(--panel);
}

body.mind-page .mind-play-label,
body.mind-page.is-upside-down .mind-play-label {
  color: #6a4e8d;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 650ms ease,
    transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .section-grid,
  .profile-grid,
  .research-layout,
  .journey-layout,
  .split-card,
  .research-grid,
  .academic-grid,
  .mind-opening,
  .mind-layout,
  .publication-card,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 2rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-toggle {
    margin-left: 0;
  }

  .hero-copy,
  .mind-heading,
  .mind-aside,
  .mind-feature,
  .mind-reference,
  .split-card,
  .contact-card {
    padding: 1.6rem;
  }

  .site-footer {
    justify-content: flex-start;
  }

  .portrait-placeholder {
    float: none;
    width: min(100%, 240px);
    margin: 0 auto 1.2rem;
  }

  .mind-note-image {
    display: block;
    width: min(100%, 240px);
    margin: 0 auto;
    justify-self: center;
    order: initial;
  }

  .mind-note-body {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 100%;
  }

  .timeline-item,
  .publication-card {
    gap: 0.5rem;
  }

  .mind-card-wide,
  .mind-note-card {
    grid-column: auto;
  }

  .mind-theme-browser,
  .mind-layout.is-filtered {
    grid-template-columns: 1fr;
  }

  .mind-theme-controls {
    justify-content: start;
  }

  .mind-theme-status {
    text-align: left;
  }

  .mind-graph-note {
    grid-column: auto;
  }

  .mind-dirac-note,
  .mind-reading-note,
  .mind-eddington-note {
    grid-column: auto;
  }

  .mind-copy {
    column-count: 1;
  }

  .mind-play-form {
    grid-template-columns: 1fr;
  }

  .mind-play-input-wrap {
    gap: 0.4rem;
  }

  .interest-groups {
    grid-template-columns: 1fr;
  }

  .mind-opening {
    gap: 0;
  }

  .mind-aside {
    border-left: 0;
    border-top: 1px solid rgba(20, 118, 126, 0.14);
  }

  .equation-side {
    width: min(15vw, 130px);
    padding-bottom: 1.4rem;
  }

  .equation-line mjx-container[jax="SVG"] {
    font-size: 0.7rem;
  }

}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 0.5rem;
  }

  .site-nav {
    gap: 0.7rem;
  }

  .site-nav a {
    font-size: 0.69rem;
  }

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

  .mind-theme-button {
    width: 100%;
  }

  .mind-theme-button[data-theme="all"] {
    grid-column: 1;
    grid-row: 1;
  }

  .mind-theme-button[data-theme="ai"] {
    grid-column: 2;
    grid-row: 1;
  }

  .mind-theme-button[data-theme="people"] {
    grid-column: 1;
    grid-row: 2;
  }

  .mind-theme-button[data-theme="math"] {
    grid-column: 2;
    grid-row: 2;
  }

  .mind-theme-button[data-theme="physics"] {
    grid-column: 1;
    grid-row: 3;
  }

  .mind-theme-button[data-theme="asphalt"] {
    grid-column: 2;
    grid-row: 3;
  }

  .button,
  .contact-links a {
    width: 100%;
  }

  .hero-copy {
    border-radius: 1.5rem;
  }

  .quote-text {
    font-size: 1.6rem;
  }

  .equation-columns {
    display: none;
  }

  .theme-toggle {
    padding: 0.72rem 0.85rem;
    font-size: 0.74rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.35rem;
  }
}

/* Academic identity, research programme, software, and publication archive */
.identity-title {
  max-width: none;
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(3.2rem, 6vw, 5.35rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.identity-statement {
  max-width: 24ch;
  margin: 0 0 1.2rem;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.05;
}

.research-shell,
.tools-shell,
.publications-hero,
.publication-summary,
.publication-index,
.publication-archive {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.research-shell,
.tools-shell {
  padding: clamp(1.5rem, 3vw, 2.35rem);
  border-radius: 2rem;
}

.research-section,
.tools-section,
.contact-section {
  scroll-margin-top: 6.5rem;
}

.research-shell {
  background:
    radial-gradient(circle at 92% 8%, rgba(14, 94, 102, 0.1), transparent 25%),
    radial-gradient(circle at 8% 92%, rgba(169, 119, 36, 0.08), transparent 24%),
    var(--panel);
}

.research-heading-row,
.tools-heading,
.publication-section .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.research-heading-row > div,
.tools-heading > div {
  max-width: 690px;
}

.research-heading-row h2,
.tools-heading h2 {
  max-width: 13ch;
  margin-top: 0.6rem;
  font-size: clamp(2.55rem, 4.7vw, 4.25rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.research-lede,
.tools-heading > p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
}

.research-throughline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2rem;
  border: 1px solid rgba(14, 94, 102, 0.14);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.research-step {
  position: relative;
  min-height: 150px;
  padding: 1.15rem 1.15rem 1rem;
  border-right: 1px solid rgba(14, 94, 102, 0.12);
}

.research-step:last-child {
  border-right: 0;
}

.research-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 2.1rem;
  right: -0.32rem;
  z-index: 1;
  width: 0.62rem;
  height: 0.62rem;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  background: var(--panel);
  transform: rotate(45deg);
}

.research-step span,
.research-program-index,
.tool-status,
.record-status {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.research-step strong {
  display: block;
  margin-top: 0.65rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1;
}

.research-step p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.research-programs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.research-program {
  --program-accent: #0e5e66;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--program-accent) 22%, var(--line));
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--program-accent) 14%, transparent), transparent 34%),
    color-mix(in srgb, var(--program-accent) 5%, var(--panel-strong));
}

.research-program-materials {
  --program-accent: #9a563d;
}

.research-program-decisions {
  --program-accent: #446986;
}

.research-program::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--program-accent);
}

.research-program-index {
  margin: 0;
  color: var(--program-accent);
}

.research-program h3 {
  margin: 0.6rem 0 0.75rem;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  line-height: 0.98;
}

.research-program > p:not(.research-program-index),
.research-program li {
  color: var(--muted);
}

.research-program > p:not(.research-program-index) {
  margin: 0;
  line-height: 1.6;
}

.research-program ul {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.95rem;
  padding-left: 1rem;
}

.research-program li {
  line-height: 1.4;
}

.tools-shell {
  background:
    radial-gradient(circle at 8% 12%, rgba(169, 119, 36, 0.1), transparent 23%),
    radial-gradient(circle at 92% 88%, rgba(62, 112, 132, 0.09), transparent 24%),
    var(--panel);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.7rem;
}

.tool-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background: var(--panel-strong);
  box-shadow: 0 16px 36px rgba(31, 38, 44, 0.07);
}

.tool-visual {
  position: relative;
  min-height: 185px;
  padding: 0.8rem 0.9rem 1.9rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(31, 36, 48, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 36, 48, 0.045) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), var(--accent-soft));
  background-size: 22px 22px, 22px 22px, auto;
}

.tool-visual svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--accent);
}

.tool-visual > span {
  position: absolute;
  right: 1rem;
  bottom: 0.78rem;
  left: 1rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tool-axis,
.tool-road-secondary,
.tool-layer {
  fill: none;
  stroke: rgba(31, 36, 48, 0.2);
  stroke-width: 2;
}

.tool-curve,
.tool-road,
.tool-marker,
.tool-crack,
.tool-arrest {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-sensors circle,
.tool-sites circle {
  fill: var(--panel-strong);
  stroke: currentColor;
  stroke-width: 3;
}

.tool-bundle {
  fill: color-mix(in srgb, var(--accent) 10%, transparent);
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.tool-interlayer {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
}

.tool-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.3rem 1.35rem 1.4rem;
}

.tool-status,
.record-status {
  margin: 0;
}

.tool-card h3 {
  margin: 0.55rem 0 0.7rem;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  line-height: 1;
}

.tool-copy > p:not(.tool-status) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tool-actions,
.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1.05rem;
}

.tool-actions a,
.publication-actions a,
.section-heading-link,
.doi-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent);
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.35;
}

.tool-actions a + a::before,
.publication-actions a + a::before {
  content: "\00b7";
  margin-right: 0.55rem;
  color: var(--gold);
}

.publication-section .section-heading {
  padding-bottom: 1.2rem;
}

.section-heading-note {
  max-width: 66ch;
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.section-heading-link {
  flex: 0 0 auto;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.publication-actions {
  margin-top: 0.85rem;
  padding-top: 0;
}

.publications-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 1rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.publications-hero-copy,
.publication-summary {
  padding: clamp(1.7rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.publications-hero-copy {
  background:
    radial-gradient(circle at 88% 12%, rgba(14, 94, 102, 0.11), transparent 24%),
    radial-gradient(circle at 10% 92%, rgba(169, 119, 36, 0.09), transparent 22%),
    var(--panel);
}

.publications-hero h1 {
  max-width: 11ch;
  margin-top: 0.75rem;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  letter-spacing: -0.04em;
}

.publications-hero h1 span {
  margin-top: 0.18rem;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
}

.publications-hero-lede {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.publications-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.publication-summary {
  display: grid;
  align-content: center;
  gap: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(169, 119, 36, 0.14), transparent 34%),
    var(--panel-strong);
}

.publication-stat {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.publication-stat strong {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.5rem;
  line-height: 1;
}

.publication-stat span {
  color: var(--muted);
  line-height: 1.35;
}

.publication-summary > p {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.publication-index {
  position: sticky;
  top: 6.6rem;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.15rem;
  border-radius: 1.35rem;
  background: rgba(252, 248, 240, 0.88);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.publication-index a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.1rem;
  padding: 0.8rem 1rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.publication-index a:last-child {
  border-right: 0;
}

.publication-index a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.publication-index span {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.publication-archive {
  scroll-margin-top: 11rem;
  margin-top: 1.15rem;
  padding: clamp(1.5rem, 3vw, 2.3rem);
  border-radius: 2rem;
}

.archive-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 0.35rem 2rem;
  align-items: end;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.archive-heading .section-kicker {
  grid-column: 1 / -1;
  margin: 0;
}

.archive-heading h2 {
  font-size: clamp(2.35rem, 4vw, 3.5rem);
  line-height: 0.95;
}

.archive-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.publication-year-group {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1.4rem;
}

.archive-year {
  position: sticky;
  top: 11.8rem;
  align-self: start;
  margin: 0;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.publication-records {
  display: grid;
  gap: 0;
}

.publication-record {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1.15rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.publication-record[id] {
  scroll-margin-top: 11rem;
}

.publication-record:first-child {
  padding-top: 0;
}

.publication-record:last-child {
  border-bottom: 0;
}

.publication-number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.1rem;
  border: 1px solid rgba(14, 94, 102, 0.18);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.publication-record h3 {
  max-width: 48ch;
  margin: 0;
  font-size: clamp(1.45rem, 2.25vw, 1.85rem);
  line-height: 1.08;
}

.publication-record p:not(.record-status) {
  max-width: 82ch;
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.doi-link {
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.doi-link span {
  color: var(--muted);
  font-weight: 500;
}

.manuscript-archive .publication-records {
  margin-top: 1.25rem;
}

.record-status {
  margin-bottom: 0.42rem;
}

body.is-upside-down .publication-index {
  background: rgba(38, 11, 16, 0.9);
}

body.is-upside-down .tool-visual {
  background:
    linear-gradient(rgba(246, 226, 218, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 226, 218, 0.045) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.02), var(--accent-soft));
  background-size: 22px 22px, 22px 22px, auto;
}

@media (max-width: 980px) {
  .research-heading-row,
  .tools-heading,
  .publication-section .section-heading,
  .publications-hero,
  .archive-heading {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .research-lede,
  .tools-heading > p {
    max-width: 68ch;
  }

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

  .research-step:nth-child(2) {
    border-right: 0;
  }

  .research-step:nth-child(2)::after {
    display: none;
  }

  .research-step:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(14, 94, 102, 0.12);
  }

  .research-programs,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1fr);
  }

  .tool-visual {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .section-heading-link {
    margin-top: 0.3rem;
  }

  .publication-index {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publication-index a:nth-child(2) {
    border-right: 0;
  }

  .publication-index a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .publication-archive {
    scroll-margin-top: 6.5rem;
  }

  .publication-record[id] {
    scroll-margin-top: 6.5rem;
  }

  .archive-heading {
    display: grid;
    gap: 0.45rem;
  }

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

  .archive-year {
    position: static;
  }
}

@media (max-width: 640px) {
  body:not(.mind-page) .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    gap: 0.8rem 0.7rem;
    align-items: center;
    padding: 0.85rem 1rem;
  }

  body:not(.mind-page) .brand {
    grid-area: brand;
  }

  body:not(.mind-page) .theme-toggle {
    grid-area: toggle;
  }

  body:not(.mind-page) .site-nav {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(4, max-content);
    width: 100%;
    justify-content: space-between;
    gap: 0.55rem 0.35rem;
    margin: 0;
  }

  body:not(.mind-page) .site-nav .nav-mind {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .identity-title {
    margin-top: 0.7rem;
    font-size: clamp(2.85rem, 15vw, 4.15rem);
  }

  .identity-statement {
    font-size: 1.45rem;
  }

  .research-throughline {
    grid-template-columns: 1fr;
  }

  .research-step,
  .research-step:nth-child(2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(14, 94, 102, 0.12);
  }

  .research-step:last-child {
    border-bottom: 0;
  }

  .research-step::after {
    display: none;
  }

  .tool-card {
    display: flex;
  }

  .tool-visual {
    min-height: 155px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .publication-section .section-heading {
    gap: 0.75rem;
  }

  .publications-hero-copy,
  .publication-summary,
  .research-shell,
  .tools-shell,
  .publication-archive {
    border-radius: 1.5rem;
  }

  .publications-hero h1 {
    font-size: clamp(3.15rem, 16vw, 4.55rem);
  }

  .publication-index {
    grid-template-columns: 1fr;
  }

  .publication-index a,
  .publication-index a:nth-child(2) {
    min-height: 3.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .publication-index a:last-child {
    border-bottom: 0;
  }

  .publication-record {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .publication-number {
    width: 1.75rem;
    height: 1.75rem;
  }

  .doi-link {
    align-items: flex-start;
    flex-direction: column;
    overflow-wrap: anywhere;
  }
}
