/* Shared by every Astro route and the public /design/ reference. */
:root {
  color-scheme: light;
  --bg: #fbfcff;
  --surface: #fff;
  --soft: #eef3fa;
  --text: #16202b;
  --muted: #4d5966;
  --link: #0b5fb0;
  --violet: #6d3bd1;
  --teal: #086e60;
  --border: #cbd3dc;
  --nav: rgba(251, 252, 255, 0.94);
  --focus: #9b4c00;
  --shadow: 0 16px 48px -28px #20385266;
  --glow: rgba(109, 59, 209, 0.09);
  --radius: 20px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --measure: 1180px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1318;
  --surface: #151b23;
  --soft: #1c2531;
  --text: #e8edf2;
  --muted: #aab5c0;
  --link: #8cc0ff;
  --violet: #c6a3ff;
  --teal: #6fe3c8;
  --border: #344253;
  --nav: rgba(15, 19, 24, 0.94);
  --focus: #ffb35c;
  --shadow: 0 16px 48px -28px #000;
  --glow: rgba(140, 192, 255, 0.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1318;
    --surface: #151b23;
    --soft: #1c2531;
    --text: #e8edf2;
    --muted: #aab5c0;
    --link: #8cc0ff;
    --violet: #c6a3ff;
    --teal: #6fe3c8;
    --border: #344253;
    --nav: rgba(15, 19, 24, 0.94);
    --focus: #ffb35c;
    --shadow: 0 16px 48px -28px #000;
    --glow: rgba(140, 192, 255, 0.07);
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}
::selection {
  background: #ffe267;
  color: #16202b;
}
a {
  color: var(--link);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a,
button {
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
}
img,
video,
svg {
  max-width: 100%;
  height: auto;
}
iframe {
  max-width: 100%;
  border: 0;
}
img {
  display: block;
}
h1,
h2,
h3,
h4 {
  line-height: 1.13;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--text);
}
h1 {
  font-size: clamp(2.35rem, 5.5vw, 4.6rem);
  margin: 0 0 1.2rem;
  font-weight: 750;
}
h2 {
  font-size: clamp(1.8rem, 3.3vw, 2.65rem);
  margin: 0 0 1.1rem;
}
h3 {
  font-size: 1.4rem;
  margin: 0.5rem 0 0.8rem;
}
p {
  margin: 0 0 1.1rem;
}
ul,
ol {
  padding-left: 1.4rem;
}
li {
  margin: 0.45rem 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
  border-radius: 3px;
}
[hidden] {
  display: none !important;
}
main {
  max-width: var(--measure);
  margin: auto;
  padding: 0 28px 56px;
  min-height: 60vh;
}
main:focus {
  outline: none;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 1000;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
}
.skip-link:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.small {
  font-size: 0.88rem;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 650;
  margin: 0 0 1rem;
}
.lede {
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 64ch;
}
.gradient-text {
  color: var(--link);
  background: linear-gradient(105deg, var(--link), var(--violet));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.marker {
  padding: 0.1em 0.2em 0.15em;
  border-radius: 0.5em 0.22em 0.45em 0.18em;
  background: linear-gradient(
    97deg,
    #ffda2df0 3%,
    #ffd820e0 50%,
    #ffd420eb 90%
  );
  background-size: 100% 78%;
  background-position: 0 65%;
  background-repeat: no-repeat;
  color: #33290a;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.section {
  padding: 68px 0;
  border-top: 1px solid var(--border);
}
.section-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  margin-bottom: 0;
}
.section-head > a {
  white-space: nowrap;
  font-weight: 600;
}
.page-intro {
  padding: 72px 0 44px;
  max-width: 850px;
}
.page-intro .lede {
  margin: 0;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.button-primary {
  background: #0b5fb0;
  color: white;
  border-color: #0b5fb0;
}
.button-text {
  border-color: transparent;
  background: transparent;
  color: var(--link);
  padding-inline: 0;
}
.text-link {
  font-weight: 650;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--measure);
  padding: 16px 28px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.brand-degree {
  font-weight: 400;
  color: var(--muted);
}
.brand img {
  border-radius: 5px;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 0;
}
.primary-nav a:hover,
.primary-nav a[aria-current] {
  color: var(--link);
}
.primary-nav a[aria-current] {
  box-shadow: 0 2px var(--link);
}
.primary-nav .nav-contact {
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
}
.nav-controls {
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle,
.menu-toggle {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
}
.theme-picker {
  position: relative;
}
.theme-toggle {
  border-color: var(--link);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--link) 12%, transparent);
}
.theme-toggle:hover,
.theme-toggle[aria-expanded="true"] {
  background: var(--soft);
  color: var(--link);
}
.theme-icons {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.theme-icons svg {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}
.theme-moon,
:root[data-theme="dark"] .theme-sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}
:root[data-theme="dark"] .theme-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-options {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 180px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.theme-options button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.9rem;
}
.theme-options button:hover,
.theme-options button[aria-pressed="true"] {
  color: var(--link);
  background: var(--soft);
}
.theme-options button[aria-pressed="true"] {
  border-color: var(--link);
  font-weight: 700;
}
.theme-options p {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 8px 8px 2px;
}
.profile-icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 1.15em;
  display: inline-block;
  vertical-align: -0.15em;
}
.contact-card {
  max-width: 760px;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.contact-card .contact-email {
  overflow-wrap: anywhere;
}
.copy-status {
  min-height: 1.65em;
  margin-bottom: 0;
}
.menu-toggle {
  display: none;
}
.home-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 64px;
  padding: 76px 0 60px;
  align-items: center;
}
.home-hero h1 {
  font-size: clamp(2.9rem, 6vw, 5rem);
  letter-spacing: -0.055em;
  line-height: 1.04;
}
.home-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.home-position {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.home-hero .intro {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 54ch;
}
.home-hero .intro strong {
  color: var(--text);
  font-weight: 600;
}
.portrait-wrap {
  position: relative;
  padding: 16px;
}
.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 140px 140px 30px 30px;
  transform: rotate(5deg);
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: 10% -8% -5%;
  background: radial-gradient(ellipse, var(--glow), transparent 70%);
  z-index: -1;
}
.hero-portrait {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: 50% 35%;
  border-radius: 130px 130px 24px 24px;
  background: var(--soft);
}
.portrait-caption {
  position: relative;
  padding: 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}
.portrait-caption strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
}
.affiliation {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--muted);
}
.affiliation strong {
  color: var(--text);
}
.evidence-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}
.evidence {
  padding: 30px 24px 30px 0;
}
.evidence + .evidence {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.evidence strong {
  font-size: 1.75rem;
  color: var(--text);
  line-height: 1.2;
  display: block;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.evidence span {
  color: var(--muted);
  font-size: 0.85rem;
}
.grid-3,
.project-grid,
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-visual {
  aspect-ratio: 16/10;
  background: var(--soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.card:hover .card-visual img {
  transform: scale(1.025);
}
.card-visual.contain img {
  object-fit: contain;
  padding: 10px;
}
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: start;
  flex: 1;
}
.card h2,
.card h3 {
  font-size: 1.4rem;
}
.card h2 a,
.card h3 a {
  color: var(--text);
  text-decoration: none;
}
.card p {
  font-size: 0.92rem;
  color: var(--muted);
}
.card .eyebrow {
  color: var(--teal);
  font-size: 0.68rem;
  margin-bottom: 10px;
}
.card .text-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.9rem;
}
.project-monogram {
  font-family: var(--mono);
  font-size: 3rem;
  letter-spacing: -0.09em;
  color: var(--violet);
}
.plain-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.plain-card p {
  color: var(--muted);
}
.plain-card .index {
  color: var(--violet);
  font-family: var(--mono);
  font-size: 0.82rem;
  display: block;
  margin-bottom: 20px;
}
.feature-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  background: linear-gradient(125deg, var(--soft), var(--surface));
  align-items: center;
}
.feature-panel p {
  color: var(--muted);
}
.feature-art {
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}
.feature-art img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.contact-section {
  padding: 65px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  border-top: 1px solid var(--border);
}
.contact-section h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.contact-details {
  padding-top: 10px;
}
.contact-email {
  font-size: clamp(1.2rem, 2.7vw, 1.8rem);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-links a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  font-size: 0.85rem;
  text-decoration: none;
}
.social-links a:hover {
  background: var(--soft);
  border-color: var(--link);
}
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--soft);
}
.footer-inner,
.footer-bottom {
  max-width: var(--measure);
  margin: auto;
  padding: 40px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.footer-inner p {
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.2rem;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  font-size: 0.76rem;
  color: var(--muted);
}
.tag-list,
.meta {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li,
.tag,
.meta li {
  border: 1px solid var(--border);
  background: var(--soft);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.75rem;
  margin: 0;
  color: var(--muted);
}
.project-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.filter-button {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 15px;
  min-height: 44px;
  font-size: 0.82rem;
}
.filter-button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.project-grid {
  margin: 24px 0 48px;
}
.split-section {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 70px;
  padding: 50px 0;
  border-top: 1px solid var(--border);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  padding: 0 0 26px 22px;
  margin: 0;
  border-left: 1px solid var(--border);
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--violet);
  border-radius: 50%;
}
.timeline h3 {
  font-size: 1.15rem;
  margin: 3px 0 5px;
}
.timeline p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0;
}
.timeline .date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--teal);
}
.reading-list {
  padding: 0;
  list-style: none;
  margin: 0;
}
.reading-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.reading-list li:first-child {
  padding-top: 0;
}
.reading-list h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}
.reading-list p {
  color: var(--muted);
  font-size: 0.88rem;
}
.status-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
}
/* Blog and news: compact, dated lists inspired by the al-folio homepage. */
.home-updates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--border);
}
.home-updates > section:only-child {
  grid-column: 1 / -1;
}
.home-updates > section {
  min-width: 0;
}
.home-updates .section-head {
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}
.home-updates h2 {
  font-size: 1.6rem;
}
.home-updates .section-head > a {
  font-size: 0.85rem;
}
.dated-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dated-list > li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.dated-list > li:first-child {
  padding-top: 0;
}
.dated-list > li:last-child {
  border-bottom: 0;
}
.dated-list time {
  color: var(--muted);
  font: 0.75rem/1.8 var(--mono);
  padding-top: 3px;
}
.dated-list h2,
.dated-list h3 {
  font-size: 1.06rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin: 0 0 7px;
}
.dated-list h2 a,
.dated-list h3 a {
  text-decoration: none;
}
.dated-list h2 a:hover,
.dated-list h3 a:hover {
  text-decoration: underline;
}
.dated-list p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 8px;
}
.dated-list > li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dated-list p:last-child {
  margin-bottom: 0;
}
.post-list-full > li {
  padding-block: 30px;
}
.post-list-full h2,
.post-list-full h3 {
  font-size: 1.5rem;
}
.post-meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.dated-list .post-meta {
  font-size: 0.76rem;
}
.editorial-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.editorial-tags li {
  color: var(--teal);
  background: var(--soft);
  padding: 3px 10px;
  margin: 0;
  font-size: 0.75rem;
  border-radius: 5px;
}
.editorial-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}
.editorial-nav a {
  padding: 8px 0;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
}
.editorial-nav a[aria-current] {
  box-shadow: 0 2px var(--link);
}
.editorial-archive {
  max-width: 880px;
  padding-bottom: 72px;
}
.editorial-empty {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.editorial-empty h2 {
  font-size: 1.35rem;
}
.editorial-empty p {
  color: var(--muted);
}
.editorial-empty.compact {
  padding: 22px;
  font-size: 0.9rem;
}
.editorial-empty.compact p {
  margin-top: 0;
}
.news-year {
  padding: 10px 0 32px;
}
.news-year > h2 {
  font-size: 1.45rem;
  color: var(--teal);
  margin-bottom: 28px;
}
.editorial-article {
  max-width: 800px;
  margin: auto;
  padding: 55px 0;
}
.editorial-article-header {
  margin-bottom: 36px;
}
.editorial-article-header .eyebrow {
  margin-top: 32px;
}
.editorial-article h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.75rem);
}
.editorial-article .prose {
  max-width: none;
}
.editorial-cover {
  margin: 0 0 36px;
}
.editorial-cover img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--soft);
}
.editorial-cover figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 10px;
}
.more-posts {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.more-posts h2 {
  font-size: 1.5rem;
}
@media (min-width: 1101px) and (max-width: 1150px) {
  .nav-inner {
    gap: 18px;
  }
  .primary-nav {
    gap: 13px;
  }
  .brand-degree {
    display: none;
  }
}
@media (max-width: 900px) {
  .home-updates {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 650px) {
  .home-updates {
    padding-block: 32px;
  }
  .home-updates .section-head {
    display: flex;
  }
  .home-updates .section-head > a {
    margin-top: 0;
  }
  .dated-list > li {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-block: 18px;
  }
  .editorial-article {
    padding-top: 32px;
  }
  .editorial-archive {
    padding-bottom: 40px;
  }
}
.content,
.prose {
  max-width: 76ch;
  font-size: 1.02rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.prose h2,
.content h2 {
  font-size: 1.7rem;
  margin-top: 2rem;
}
.prose h3,
.content h3 {
  font-size: 1.25rem;
  margin-top: 1.6rem;
}
.prose img,
.content img {
  border-radius: 12px;
  margin-block: 24px;
}
.content blockquote,
.prose blockquote,
blockquote {
  margin: 24px 0;
  padding: 20px 26px;
  background: var(--soft);
  border-left: 3px solid var(--violet);
  border-radius: 0 12px 12px 0;
}
.case-study,
.post,
.interview {
  max-width: 850px;
  margin: 0 auto;
  padding: 55px 0;
}
.case-study h1,
.post h1,
.interview h1 {
  margin-top: 24px;
  font-size: clamp(2rem, 4.6vw, 3.75rem);
}
.summary {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.75;
}
.hero-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: var(--soft);
  border-radius: 20px;
  margin-block: 30px;
}
.highlight-panel {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--soft);
  margin: 26px 0;
}
.highlight-panel h2 {
  font-size: 1.35rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-block: 32px;
}
.gallery a {
  display: block;
}
.gallery img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.back-link {
  font-size: 0.9rem;
}
.source-note {
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 30px;
}
.video-embed {
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--soft);
}
.video-embed iframe {
  width: 100%;
  height: 100%;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.swatch {
  height: 80px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  background: var(--surface);
}
summary {
  font-weight: 650;
  cursor: pointer;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.table-scroll {
  overflow-x: auto;
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--soft);
  padding: 0.15em 0.3em;
  border-radius: 4px;
}
pre {
  max-width: 100%;
  overflow: auto;
  padding: 18px;
  background: var(--soft);
  border-radius: 12px;
}
pre code {
  background: transparent;
  padding: 0;
}
.teaching-photo {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 16px;
}
.course-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  list-style: none;
  padding: 0;
}
.course-list li {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  margin: 0;
}
.course-list strong {
  font-size: 1.02rem;
  display: block;
  line-height: 1.5;
}
.course-list span {
  color: var(--muted);
  font-size: 0.85rem;
}
.about-photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 24px;
}
@media (min-width: 1101px) {
  .primary-nav {
    display: flex !important;
  }
}
@media (max-width: 1100px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 12px;
  }
  .nav-controls {
    margin-left: auto;
    order: 0;
  }
  .menu-toggle {
    display: flex;
  }
  .primary-nav {
    width: 100%;
    order: 4;
    margin: 0;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 12px 0;
  }
  .js .primary-nav {
    display: none;
  }
  .js .primary-nav.is-open {
    display: flex;
  }
  .home-hero {
    gap: 32px;
    grid-template-columns: 1.2fr 0.85fr;
    padding-top: 50px;
  }
  .grid-3,
  .project-grid,
  .research-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split-section {
    gap: 36px;
  }
  .feature-panel {
    gap: 28px;
    padding: 28px;
  }
  .contact-section {
    gap: 30px;
  }
  .brand-degree {
    display: none;
  }
}
@media (max-width: 650px) {
  main {
    padding-inline: 20px;
  }
  .nav-inner {
    padding-inline: 20px;
  }
  .primary-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }
  .js .primary-nav:not(.is-open) {
    display: none !important;
  }
  .primary-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
  }
  .home-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 40px;
  }
  .home-hero h1 {
    font-size: clamp(2.6rem, 11.5vw, 4rem);
  }
  .portrait-wrap {
    max-width: 350px;
    width: 85%;
    margin: auto;
  }
  .hero-portrait {
    aspect-ratio: 1;
  }
  .affiliation {
    flex-direction: column;
    align-items: start;
    gap: 8px;
  }
  .evidence {
    padding: 22px 12px 22px 0;
  }
  .evidence + .evidence {
    padding-left: 12px;
  }
  .evidence strong {
    font-size: 1.35rem;
  }
  .evidence span {
    font-size: 0.73rem;
  }
  .section {
    padding: 42px 0;
  }
  .section-head {
    display: block;
  }
  .section-head > a {
    display: inline-block;
    margin-top: 14px;
  }
  .grid-3,
  .grid-2,
  .project-grid,
  .research-grid,
  .feature-panel,
  .contact-section,
  .split-section {
    grid-template-columns: 1fr;
  }
  .feature-panel {
    padding: 24px;
  }
  .contact-section {
    gap: 20px;
    padding: 42px 0;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 20px;
  }
  .footer-bottom {
    padding-inline: 20px;
    gap: 10px;
  }
  .page-intro {
    padding: 42px 0 30px;
  }
  .split-section {
    gap: 20px;
    padding: 32px 0;
  }
  .course-list {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .swatches {
    grid-template-columns: 1fr 1fr;
  }
  .theme-label {
    display: none;
  }
  .theme-toggle {
    width: 44px;
  }
  .case-study,
  .post,
  .interview {
    padding: 32px 0;
  }
  .card-body {
    padding: 22px;
  }
  .button-row .button {
    flex-grow: 1;
  }
  .brand {
    font-size: 0.95rem;
  }
  .gallery img {
    height: auto;
    max-height: 500px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .typing-line [data-typewriter]::after {
    display: none;
  }
}
@media print {
  .site-header,
  .site-footer,
  .button-row,
  .project-filters {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
  main {
    max-width: none;
  }
  a {
    color: inherit;
  }
  .card,
  .plain-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Long titles, URLs, and grid children must be able to reflow at 320px. */
h1,
h2,
h3,
a {
  overflow-wrap: anywhere;
}
.grid-2 > *,
.grid-3 > *,
.feature-panel > *,
.contact-section > *,
.split-section > * {
  min-width: 0;
}
.citation-text {
  overflow-wrap: anywhere;
}
.related {
  margin-top: 40px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}
.related-head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.related .thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.related .card-body {
  padding: 20px;
}
.interview .hero-image {
  max-width: 350px;
}
.interview .portrait {
  width: 100%;
  height: auto;
}
.interview .meta {
  color: var(--muted);
  font-size: 0.85rem;
}
.citation-block {
  padding: 22px;
  background: var(--soft);
  border-radius: 12px;
  font-size: 0.9rem;
}
.interview .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Publication pages keep the original abstract next to its citation. */
.publication-article {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 0 64px;
}
.publication-article h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  margin: 24px 0 16px;
}
.publication-authors {
  margin-bottom: 8px;
}
.publication-abstract {
  margin-top: 24px;
}
.publication-article .prose {
  max-width: none;
}
.publication-article .button-row {
  margin: 24px 0;
}
.publication-article a {
  overflow-wrap: anywhere;
}
