/* Custom publishing layout; original theme attribution remains in LICENSE. */
:root {
  color-scheme: dark;
  --bg: #111619;
  --surface: #192125;
  --text: #e4e7e5;
  --muted: #a4b1b4;
  --accent: #b9d9c0;
  --line: #354246;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 17px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover {
  color: #fff;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #e9bf86;
  outline-offset: 5px;
  border-radius: 2px;
}
::selection {
  background: #42634c;
  color: white;
}
[hidden] {
  display: none !important;
}
.shell {
  width: min(1100px, calc(100% - 80px));
  margin-inline: auto;
}
.site-header {
  padding-block: 32px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.wordmark {
  font-weight: 650;
  color: var(--text);
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 23px;
  font-size: 0.82rem;
}
.site-header nav a {
  text-decoration: none;
  color: var(--muted);
}
.site-header nav a:hover,
.site-header nav a[aria-current] {
  color: var(--text);
  text-decoration: underline;
}
.skip {
  position: absolute;
  top: -100px;
  inset-inline-start: 12px;
  background: var(--text);
  color: var(--bg);
  padding: 10px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
.hero {
  padding-block: 78px 64px;
  max-width: 820px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 550;
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 7.1vw, 5.5rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 24px 0 30px;
}
.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}
.intro {
  font-size: 1.13rem;
  line-height: 1.75;
  max-width: 710px;
}
.muted,
.small {
  color: var(--muted);
}
.small {
  font-size: 0.78rem;
}
.hero-links {
  display: flex;
  gap: 32px;
  margin-top: 30px;
}
.hero-links a:first-child {
  font-weight: 650;
}
.languages {
  display: flex;
  gap: 22px;
  margin-top: 30px;
  font-size: 0.85rem;
}
.languages a {
  color: var(--muted);
}
.home-section {
  padding-block: 36px 42px;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.section-heading h2 {
  font-size: 1.35rem;
  font-weight: 550;
  margin: 0;
}
.section-heading > a {
  font-size: 0.85rem;
}
.article-list {
  padding: 0;
  list-style: none !important;
  margin: 24px 0;
}
.article-list > li {
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}
.article-list h2,
.article-list h3 {
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.5;
  margin: 9px 0;
}
.article-list h2 a,
.article-list h3 a {
  color: var(--text);
  text-decoration: none;
}
.article-list h2 a:hover,
.article-list h3 a:hover {
  text-decoration: underline;
}
.article-list p {
  font-size: 0.92rem;
  margin-bottom: 0;
}
.list-meta {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.feature-title {
  font-family: Georgia, serif;
  font-size: 2rem;
  margin: 20px 0 0;
}
.feature-title a {
  text-decoration: none;
}
.page {
  padding-block: 60px 70px;
}
.prose {
  max-width: 780px;
  margin-inline: auto;
  overflow-wrap: break-word;
}
.prose h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.prose h2 {
  font-size: 1.55rem;
  font-weight: 550;
  line-height: 1.4;
  margin-top: 2em;
  scroll-margin-top: 24px;
}
.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.8em;
}
.prose p,
.prose ul,
.prose ol {
  margin-block: 1.15em;
}
.prose li {
  margin-block: 0.45em;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}
.prose figure {
  margin-inline: 0;
}
.prose figcaption {
  color: var(--muted);
  font-size: 0.85rem;
}
.prose blockquote {
  border-inline-start: 3px solid var(--accent);
  margin-inline: 0;
  padding-inline: 24px;
  color: var(--muted);
}
.page-title {
  margin-bottom: 32px;
}
.translations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.85rem;
  color: var(--muted);
}
.toc {
  border-block: 1px solid var(--line);
  padding-block: 14px;
  margin: 30px 0;
}
.toc summary {
  cursor: pointer;
  color: var(--accent);
}
.toc ul {
  font-size: 0.9rem;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.filters {
  display: flex;
  gap: 20px;
  padding: 22px 0;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  flex: 1;
  min-width: 0;
}
input,
select {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #607176;
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
}
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 30px 45px;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer p:first-child {
  margin-top: 0;
}
.site-footer .small {
  margin-top: 25px;
}
pre {
  background: #1b2327;
  padding: 20px;
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  line-height: 1.55;
  font-size: 0.86rem;
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}
p code,
li code {
  background: var(--surface);
  padding: 0.12em 0.3em;
  border-radius: 3px;
}
pre,
code,
kbd,
samp,
.MathJax,
mjx-container {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}
a[href^="http"],
a[href^="mailto"] {
  unicode-bidi: isolate;
}
table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow: auto;
  font-size: 0.9rem;
}
td,
th {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: start;
}
.highlight .k,
.highlight .kd,
.highlight .kn {
  color: #c5b6ed;
}
.highlight .s,
.highlight .s1,
.highlight .s2 {
  color: #c7d9a4;
}
.highlight .c,
.highlight .c1 {
  color: #a1b5be;
}
.highlight .n,
.highlight .nf {
  color: #a5d8e5;
}
.highlight .mi,
.highlight .mf {
  color: #edc292;
}
[lang="ar"] {
  font-family: "Geeza Pro", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}
[lang="ar"] .prose {
  font-size: 1.14rem;
  line-height: 1.95;
}
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3 {
  font-family: inherit;
  letter-spacing: 0;
  line-height: 1.6;
}
[lang="ar"] .eyebrow {
  letter-spacing: 0;
}
[lang="ar"] .list-meta {
  direction: ltr;
}
[lang="ar"] code {
  font-family: ui-monospace, monospace;
}
mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 0.3em;
}
@media (max-width: 800px) {
  .shell {
    width: calc(100% - 40px);
  }
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding-block: 24px;
  }
  .site-header nav {
    gap: 12px 21px;
  }
  .hero {
    padding-block: 48px;
  }
  .hero h1 {
    font-size: clamp(3.1rem, 10vw, 4.6rem);
  }
  .page {
    padding-block: 40px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading > a {
    white-space: nowrap;
  }
  .filters {
    flex-direction: column;
    gap: 14px;
  }
  .prose h1 {
    font-size: 2.2rem;
  }
  .intro {
    font-size: 1.05rem;
  }
  .hero-links {
    gap: 24px;
  }
  pre {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Profile-led layout with visible page navigation. */
.site-header {
  display: block;
  padding-block: 28px 0;
  border-bottom: 0;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 25px;
}
.header-languages {
  display: flex;
  gap: 18px !important;
}
.header-languages a {
  font-size: 0.8rem;
}
.site-header .main-nav {
  display: flex;
  gap: 5px;
  border-block: 1px solid var(--line);
  padding: 0;
  flex-wrap: wrap;
}
.site-header .main-nav a {
  padding: 13px 19px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 0.88rem;
  text-decoration: none;
}
.site-header .main-nav a:hover {
  background: var(--surface);
  color: var(--text);
}
.site-header .main-nav a[aria-current] {
  border-bottom-color: var(--accent);
  color: var(--accent);
  background: #19221e;
}
.site-grid {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 65px;
  padding-top: 46px;
}
.site-grid main {
  min-width: 0;
}
.profile {
  font-size: 0.84rem;
  color: var(--muted);
  align-self: start;
  padding-bottom: 40px;
}
.portrait {
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 50%;
  border: 1px solid #46534c;
  display: block;
}
.portrait-link {
  display: inline-block;
  border-radius: 50%;
}
.profile-name {
  font-size: 1.19rem;
  font-weight: 650;
  color: var(--text);
  margin: 20px 0 7px;
  line-height: 1.4;
}
.profile-role {
  margin-top: 0;
  color: #c4cfca;
  line-height: 1.65;
}
.profile-details > p {
  margin-block: 18px;
}
.profile-details .small {
  font-size: 0.77rem;
}
.cv-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #607469;
  padding: 9px 12px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 24px;
}
.cv-button span {
  font-size: 0.67rem;
}
.cv-button:hover {
  background: var(--surface);
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 19px;
  margin-top: 20px;
  font-size: 0.78rem;
}
.profile-links a {
  color: var(--muted);
}
.hero {
  padding: 0 0 40px;
  max-width: none;
}
.hero .eyebrow {
  margin-top: 0;
}
.hero h1 {
  font-size: clamp(2.6rem, 4.6vw, 3.7rem);
  margin: 18px 0 24px;
  line-height: 1.13;
}
.hero .intro {
  font-size: 1.08rem;
  max-width: 650px;
}
.hero .muted {
  font-size: 0.96rem;
}
.hero-links {
  margin-top: 23px;
  font-size: 0.9rem;
}
.home-section {
  padding-block: 28px 32px;
}
.section-heading h2 {
  font-size: 1.25rem;
}
.article-list {
  margin: 10px 0 0;
}
.article-list h2,
.article-list h3 {
  font-size: 1.12rem;
}
.article-list > li {
  padding-block: 18px;
}
.article-list > li:last-child {
  border-bottom: 0;
}
.home-section .intro {
  font-size: 1rem;
}
.page {
  padding-top: 0;
}
.prose h1 {
  font-size: 2.5rem;
}
.site-footer {
  margin-top: 25px;
}
.research-title {
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.6;
}
.research-title a {
  color: var(--text);
}
@media (max-width: 1050px) {
  .site-grid {
    gap: 35px;
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .site-header .main-nav a {
    padding-inline: 15px;
  }
  .profile-name {
    font-size: 1.1rem;
  }
}
@media (max-width: 760px) {
  .site-header {
    padding-top: 22px;
  }
  .header-top {
    align-items: flex-start;
    padding-bottom: 20px;
    gap: 12px;
  }
  .wordmark {
    font-size: 0.94rem;
  }
  .wordmark span {
    font-size: 0.5rem;
  }
  .header-languages {
    gap: 12px !important;
  }
  .site-header .main-nav {
    gap: 0;
  }
  .site-header .main-nav a {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .site-grid {
    display: block;
    padding-top: 26px;
  }
  .profile {
    display: grid;
    grid-template-columns: 82px 1fr;
    column-gap: 19px;
    padding-bottom: 25px;
    margin-bottom: 29px;
    border-bottom: 1px solid var(--line);
  }
  .portrait {
    width: 82px;
    height: 82px;
  }
  .profile-name {
    margin-top: 2px;
  }
  .profile-role {
    font-size: 0.78rem;
    margin-bottom: 0;
  }
  .profile-details {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
  }
  .profile-details > p {
    display: none;
  }
  .profile-details .cv-button {
    margin: 0;
    gap: 20px;
    font-size: 0.77rem;
    padding: 7px 10px;
  }
  .profile-links {
    margin: 0;
    gap: 10px 15px;
    font-size: 0.74rem;
    flex: 1;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .hero .intro {
    font-size: 1rem;
  }
  .hero .muted {
    font-size: 0.91rem;
  }
  .hero {
    padding-bottom: 30px;
  }
  .section-heading {
    gap: 12px;
  }
  .section-heading h2 {
    font-size: 1.12rem;
  }
  .section-heading > a {
    font-size: 0.74rem;
  }
  .prose h1 {
    font-size: 2rem;
  }
  .page {
    padding-top: 0;
  }
  .site-footer {
    margin-top: 0;
  }
}

.filter-field {
  flex: 1;
  min-width: 0;
}
.filter-field label {
  margin-bottom: 8px;
}

/* Top tabs become a reading rail without duplicating links or moving focus. */
.nav-heading,
.site-header .main-nav .back-top { display: none; }
.nav-docked .site-header .main-nav {
  position: fixed;
  top: 24px;
  inset-inline-start: max(40px, calc((100% - 1100px) / 2));
  width: 225px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--bg);
  z-index: 10;
}
.nav-docked .nav-heading {
  display: block;
  padding: 7px 12px 12px;
  color: var(--muted);
  font-size: .73rem;
}
.nav-docked .site-header .main-nav a {
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-inline-start: 3px solid transparent;
  border-radius: 3px;
}
.nav-docked .site-header .main-nav a[aria-current] {
  border-inline-start-color: var(--accent);
  font-weight: 650;
}
.nav-docked .site-header .main-nav .back-top {
  display: block;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  font-size: .8rem;
}
.nav-docked .profile { visibility: hidden; }
@media (min-width: 761px) and (max-width: 1050px) {
  .nav-docked .site-header .main-nav { width: 190px; }
}
@media (min-width: 761px) and (max-width: 800px) {
  .nav-docked .site-header .main-nav { inset-inline-start: 20px; }
}
@media (max-width: 760px) {
  .nav-docked .site-header .main-nav {
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    max-height: none;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    padding: 6px 10px;
    box-shadow: 0 4px 12px #0005;
    scrollbar-width: thin;
  }
  .nav-docked .site-header .main-nav a { flex: 0 0 auto; padding: 10px 12px; }
  .nav-docked .site-header .main-nav .back-top,
  .nav-docked .nav-heading { display: none; }
  .nav-docked .profile { visibility: visible; }
  .prose h2, .prose h3, #main { scroll-margin-top: 82px; }
}
.nav-section { display: none; }
.nav-docked .nav-section {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.nav-section > span { display: block; padding-inline: 12px; color: var(--muted); font-size: .7rem; }
.nav-docked .site-header .main-nav .nav-section a {
  display: block;
  font-size: .78rem;
  line-height: 1.5;
  font-weight: 400;
  background: transparent;
  border: 0;
  text-decoration: none;
}
@media (max-width: 760px) {
  .nav-docked .nav-section { display: none; }
}
