/* Native implementation of the reference editorial design. */
:root {
  --ink: #0d1529;
  --slate900: #0d1529;
  --slate800: #0d1529;
  --slate700: #334155;
  --slate600: #475569;
  --slate500: #64748b;
  --slate400: #94a3b8;
  --slate300: #cbd5e1;
  --slate200: #e2e8f0;
  --slate100: #f1f5f9;
  --accent: #4c759f;
  --accent-hover: #3f668d;
  --button-text: #edf2f8;
  --bg: #f7f9fa;
  --sans: 'Plus Jakarta Sans',system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  --serif: 'Playfair Display',Georgia,Cambria,'Times New Roman',serif;
  --arabic: 'Cairo',system-ui,-apple-system,sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-family: var(--sans);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.modal-open {
  overflow: hidden;
}
::selection {
  background: rgba(76,117,159,.2);
  color: var(--ink);
}
button,input {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,a:focus-visible,input:focus-visible,[role=button]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
svg {
  display: block;
}
p,h1,h2,h3 {
  margin: 0;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
.icon-sprite {
  width: 0;
  height: 0;
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mono {
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono',monospace;
}
.font-serif {
  font-family: var(--serif);
}
.site {
  min-height: 100vh;
}
html[dir=rtl] .site {
  font-family: var(--arabic),var(--sans);
}
html[dir=rtl] .font-serif {
  font-family: var(--serif);
}
html[dir=rtl] .hero-title,html[dir=rtl] .section-heading {
  font-weight: 600;
}
/* Header island */
.site-header {
  position: sticky;
  top: 13.5px;
  z-index: 30;
  width: 100%;
  max-width: none;
  padding-inline: 13.5px;
  margin: 0 auto;
}
.header-island {
  min-height: 76px;
  border: 1px solid rgba(13,21,41,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: none;
  padding: 13.5px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 13.5px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 11.25px;
  min-width: 0;
  border-radius: 100px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  border-radius: 100%;
  background: white;
  border: 1px solid rgba(226,232,240,.9);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  flex-shrink: 0;
}
.brand-text {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--slate900);
  transition: color .2s;
  white-space: nowrap;
}
.brand-link:hover .brand-text {
  color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.menu-btn:active,.outline-btn:active {
  transform: scale(.95);
}
.menu-btn {
  border: 1px solid var(--slate200);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: var(--slate700);
  transition: color .2s,background .2s;
}
.menu-btn:hover {
  color: var(--slate900);
  background: var(--slate100);
}
.dropdown-nav {
  margin-top: 8px;
  padding: 16px;
  background: white;
  border: 1px solid var(--slate200);
  border-radius: 16px;
  box-shadow: 0 18px 28px rgba(15,23,42,.12);
  transform-origin: top;
  animation: dropdown-in .2s ease-out both;
}
.dropdown-nav.closing {
  animation: dropdown-out .18s ease-in both;
  pointer-events: none;
}
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--slate700);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: background .2s;
}
.nav-item:hover {
  background: var(--slate100);
}
[dir=rtl] .nav-item {
  text-align: right;
}
.nav-bottom {
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--slate100);
  font-size: 12px;
  color: var(--slate500);
}
.nav-lang {
  font-weight: 600;
  color: var(--accent);
  font-size: 12px;
}
.nav-lang:hover {
  text-decoration: underline;
}
/* Main and hero */
.main-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}
.hero,
.diagram-section,
.about-section,
.contribute-section,
.contact-section {
  scroll-margin-top: 104px;
}
.hero-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 63px;
  min-height: 88vh;
  max-width: 1440px;
  margin-inline: auto;
  padding: 81px 27px;
  background: var(--bg);
}
.hero-shell::before {
  content: none;
}
.hero {
  min-width: 0;
}
.kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4.5px 13.5px;
  border-radius: 9999px;
  border: 1px solid rgba(226,232,240,.9);
  background: rgba(255,255,255,.7);
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
  margin-bottom: 31.5px;
  user-select: none;
}
.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--accent);
  flex-shrink: 0;
}
.kicker-pill span:last-child {
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
  line-height: 16.5px;
  color: var(--slate600);
  font-weight: 500;
}
.hero-title {
  max-width: 100%;
  font-size: 54px;
  line-height: .98;
  letter-spacing: -.025em;
  color: var(--ink);
  font-weight: 600;
}
.hero-tagline {
  font-size: 27px;
  line-height: 1.25;
  margin-top: 27px;
  letter-spacing: -.025em;
  color: var(--ink);
  font-weight: 500;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 11.25px;
  margin: 27px 0 31.5px;
  user-select: none;
}
.hero-tag {
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 9999px;
  background: rgba(255,255,255,.8);
  padding: 6.75px 13.5px;
  font-size: 13.5px;
  line-height: 18px;
  color: var(--slate600);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
  transition: border-color .2s;
}
.hero-tag:hover {
  border-color: var(--slate300);
}
.hero-bio {
  max-width: 756px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 36px;
  font-weight: 400;
  color: var(--slate800);
  margin-bottom: 45px;
}
.hero-action {
  margin-bottom: 36px;
}
.primary-btn {
  background: var(--accent);
  color: var(--button-text);
  border: 1px solid var(--accent);
  border-radius: 6.75px;
  min-height: 49.5px;
  padding: 13.5px 27px;
  font-size: 15.75px;
  font-weight: 600;
  line-height: 22.5px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background .2s,transform .2s;
}
.primary-btn:hover {
  background: var(--accent-hover);
}
.primary-btn:active {
  transform: scale(.98);
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13.5px 22.5px;
  font-family: var(--serif);
  font-size: 15.75px;
  line-height: 22.5px;
  color: var(--slate700);
  padding-top: 0;
}
.social-links a {
  transition: color .2s;
}
.social-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
/* Interactive diagram */
.diagram-section {
  min-width: 0;
  align-self: center;
}
.diagram-frame {
  width: min(100%,576px);
  margin-inline: auto;
  padding: 18px;
  border: 1px solid rgba(226,232,240,.8);
  background: rgba(247,249,250,.88);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(13,21,41,.11),0 2px 6px rgba(13,21,41,.05);
}
.diagram-inner {
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(226,232,240,.6);
  border-radius: 16px;
  aspect-ratio: 4/5;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.diagram-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  letter-spacing: .1em;
  font-size: 11px;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--slate500);
  user-select: none;
}
.diagram-svg-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}
.diagram-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  overflow: visible;
  user-select: none;
}
.checkpoint-node {
  cursor: pointer;
  outline: none;
  transform-box: fill-box;
  transform-origin: center;
}
.checkpoint-node:focus-visible .hit-area {
  stroke: var(--accent);
  stroke-width: 1.5;
}
.checkpoint-node .hollow-dot,.checkpoint-node .end-dot {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .2s;
}
.checkpoint-node:hover .hollow-dot {
  transform: scale(1.25);
}
.checkpoint-node:hover .end-dot {
  transform: scale(1.1);
}
.checkpoint-node:hover .hit-area {
  fill: rgba(15,23,42,.04);
}
.checkpoint-node .node-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
}
.pulse-ring {
  transform-box: fill-box;
  transform-origin: center;
}
.diagram-svg #flow-path {
  transition: stroke-dashoffset 1120ms var(--ease);
}
.diagram-svg .checkpoint-node:nth-of-type(3) {
  opacity: 0;
  transform: scale(.5);
  transition: opacity 420ms cubic-bezier(.22,1.4,.36,1) 420ms,
              transform 420ms cubic-bezier(.22,1.4,.36,1) 420ms;
}
.diagram-svg .checkpoint-node:nth-of-type(4) {
  opacity: 0;
  transform: scale(.45);
  transition: opacity 460ms cubic-bezier(.22,1.5,.36,1) 760ms,
              transform 460ms cubic-bezier(.22,1.5,.36,1) 760ms;
}
.diagram-svg .pulse-ring {
  opacity: 0;
  transform: scale(.4);
  transition: opacity 520ms cubic-bezier(.22,1.4,.36,1) 1010ms,
              transform 520ms cubic-bezier(.22,1.4,.36,1) 1010ms;
}
.diagram-svg .end-dot,
.diagram-svg .checkpoint-node:nth-of-type(5)>circle:nth-of-type(3) {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.5);
  transition: opacity 360ms cubic-bezier(.22,1.5,.36,1) 1060ms,
              transform 360ms cubic-bezier(.22,1.5,.36,1) 1060ms;
}
.diagram-svg.diagram-drawn .checkpoint-node:nth-of-type(3),
.diagram-svg.diagram-drawn .checkpoint-node:nth-of-type(4),
.diagram-svg.diagram-drawn .pulse-ring,
.diagram-svg.diagram-drawn .end-dot,
.diagram-svg.diagram-drawn .checkpoint-node:nth-of-type(5)>circle:nth-of-type(3) {
  opacity: 1;
  transform: scale(1);
}
.diagram-svg.diagram-drawn .pulse-ring {
  animation: endpoint-pulse 1s cubic-bezier(.4,0,.6,1) 1530ms infinite;
}
.checkpoint-tooltip {
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(248,250,252,.9);
  border: 1px solid rgba(226,232,240,.8);
  border-radius: 12px;
  animation: tooltip-in .2s ease-out;
}
.tooltip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--slate800);
}
.tooltip-top strong {
  font-weight: 600;
}
.tooltip-top button {
  font-size: 12px;
  color: var(--slate400);
  padding: 0 4px;
}
.tooltip-top button:hover {
  color: var(--slate600);
}
.checkpoint-tooltip p {
  font-size: 12px;
  line-height: 18px;
  color: var(--slate600);
  margin-top: 4px;
}
.diagram-footer {
  border-top: 1px solid var(--slate100);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 10.5px;
  letter-spacing: .05em;
  font-weight: 500;
  color: var(--slate600);
  user-select: none;
}
.diagram-flower {
  font-size: 16px;
  line-height: 16px;
  color: var(--accent);
}
.diagram-narrative {
  max-width: 864px;
  padding-inline-start: 27px;
  border-inline-start: 1px solid rgba(148,163,184,.32);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 36px;
  color: var(--ink);
}
.diagram-narrative p+p {
  margin-top: 13.5px;
  font-size: 16px;
  line-height: 31.5px;
  color: var(--slate600);
}
.about-section {
  padding: 63px 27px;
  background: var(--bg);
}
/* Contributions */
.contribute-section {
  max-width: 1008px;
  margin-inline: auto;
  padding: 72px 27px;
}
.contribute-section > .section-kicker,
.contribute-section > .section-heading,
.contribute-items {
  max-width: 864px;
  margin-inline: auto;
}
.section-kicker {
  font-size: 13.5px;
  line-height: 18px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--slate500);
  margin-bottom: 18px;
  user-select: none;
}
.section-heading {
  font-size: 20.25px;
  line-height: 1.625;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 45px;
}
.contribute-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(226,232,240,.9);
}
.contribution {
  border-bottom: 1px solid rgba(226,232,240,.9);
  padding: 36px 0;
}
.contribution-number {
  font-family: var(--serif);
  font-size: 15.75px;
  line-height: 22.5px;
  font-weight: 500;
  color: var(--slate400);
  margin-bottom: 9px;
}
.contribution h3 {
  font-family: var(--serif);
  font-size: 22.5px;
  line-height: 31.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 9px;
}
.contribution p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 29.25px;
  font-weight: 400;
  color: var(--slate600);
}
[dir=rtl] .contribution h3 {
  font-family: var(--serif);
}
html[dir='rtl'] .contribution {
  display: flex;
  flex-direction: column;
}
html[dir='rtl'] .contribution-number {
  order: 3;
  margin: 9px 0 0;
}
/* Contact area */
.contact-section {
  margin: 0;
  padding: 81px 27px;
  background: var(--bg);
}
.contact-section .section-kicker {
  text-align: center;
  margin-bottom: 13.5px;
  line-height: 16.5px;
}
.contact-section .section-heading {
  text-align: center;
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 27px;
  font-weight: 400;
  letter-spacing: normal;
}
.contact-subheading {
  max-width: 756px;
  margin: 0 auto 36px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 27px;
  color: var(--slate600);
}
.contact-cta-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 40.5px;
}
.contact-cta-wrap .primary-btn {
  border-radius: 9999px;
  padding-inline: 31.5px;
  letter-spacing: .025em;
}
.contact-matrix {
  max-width: 648px;
  margin: 0 auto;
  border-top: 1px solid rgba(226,232,240,.8);
  border-bottom: 1px solid rgba(226,232,240,.8);
}
.contact-row {
  min-height: 55px;
  padding: 13.5px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15.75px;
  line-height: 27px;
}
.contact-row+.contact-row {
  border-top: 1px solid rgba(226,232,240,.8);
}
.contact-row-label {
  font-family: var(--serif);
  font-size: 15.75px;
  color: var(--slate800);
}
[dir=rtl] .contact-row-label {
  font-family: var(--serif);
  font-weight: 500;
}
.contact-row a {
  font-family: var(--serif);
  font-size: 15.75px;
  line-height: 22.5px;
  color: var(--slate500);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
  min-width: 0;
}
.contact-row a:hover,.contact-row:hover a {
  color: var(--accent);
}
.contact-row a .icon {
  width: 14px;
  height: 14px;
  color: var(--slate400);
}
.contact-row:hover a .icon {
  color: var(--accent);
}
/* Footer */
.site-footer {
  border-top: 1px solid rgba(13,21,41,.1);
  background: var(--bg);
  padding: 45px 22.5px;
  font-family: var(--serif);
  text-align: start;
}
.footer-main {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.footer-intro {
  max-width: 648px;
}
.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
html[dir='rtl'] .footer-actions {
  align-items: flex-end;
}
.footer-brand {
  font-size: 13.5px;
  line-height: 18px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--slate900);
  margin-bottom: 13.5px;
  user-select: none;
  white-space: pre-wrap;
}
.footer-closing {
  max-width: 648px;
  margin: 0;
  font-family: var(--serif);
  font-size: 15.75px;
  line-height: 1.625;
  color: var(--slate600);
}
.footer-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 22.5px;
  margin-bottom: 0;
  color: var(--slate600);
  font-size: 15.75px;
  line-height: 22.5px;
}
.footer-links a {
  font-size: inherit;
}
.footer-links a:hover {
  color: var(--slate900);
  text-decoration: underline;
}
.outline-btn {
  border: 1px solid var(--slate300);
  color: var(--slate700);
  border-radius: 9999px;
  min-height: 49.5px;
  padding: 9px 18px;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 18px;
  letter-spacing: .025em;
  transition: border-color .2s,color .2s,transform .2s;
}
.outline-btn:hover {
  border-color: var(--slate400);
  color: var(--slate900);
}
.copyright {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(13,21,41,.06);
  font-size: 13.5px;
  line-height: 18px;
  letter-spacing: .025em;
  color: var(--slate400);
}
/* Floating assistant */
.assistant-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  user-select: none;
}
.assistant-launcher button {
  position: relative;
  display: block;
  padding: 0;
  border-radius: 50%;
}
.assistant-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--slate100);
  box-shadow: 0 8px 25px rgba(15,23,42,.12);
  transition: box-shadow .3s,transform .3s;
}
.assistant-icon svg {
  width: 72%;
  height: 72%;
}
.assistant-launcher button:hover .assistant-icon {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(15,23,42,.18);
}
.status-ping {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 14px;
  height: 14px;
  display: flex;
}
.status-ping span {
  position: absolute;
  inset: 0;
  background: #4f8cf6;
  border-radius: 100%;
}
.status-ping span:first-child {
  animation: ping 1s cubic-bezier(0,0,.2,1) infinite;
  opacity: .75;
}
/* Shared overlays and dialog */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  animation: fade-in .2s ease both;
}
.overlay[hidden],.dropdown-nav[hidden],.checkpoint-tooltip[hidden] {
  display: none !important;
}
.overlay.closing {
  animation: fade-out .18s ease both;
  pointer-events: none;
}
.assistant-overlay {
  background: rgba(15,23,42,.3);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  justify-content: flex-end;
  align-items: flex-end;
}
.assistant-panel {
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 25px 50px rgba(0,0,0,.25);
  height: 85vh;
  max-height: 90vh;
  width: 100%;
  animation: slide-panel-in .3s ease both;
}
.assistant-overlay.closing .assistant-panel {
  animation: slide-panel-out .18s ease both;
}
.assistant-header {
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--slate100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.assistant-heading-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sparkle-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--slate200);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sparkle-box .icon {
  width: 16px;
  height: 16px;
  color: #4f8cf6;
}
.assistant-header h3 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--slate900);
}
.assistant-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 16px;
  color: var(--slate500);
}
.green-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}
.icon-close {
  color: var(--slate400);
  padding: 6px;
  border-radius: 8px;
  transition: background .2s,color .2s;
}
.icon-close:hover {
  color: var(--slate600);
  background: rgba(226,232,240,.5);
}
.assistant-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(248,250,252,.4);
}
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.message-row.user-message {
  flex-direction: row-reverse;
}
.message-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border: 1px solid var(--slate200);
  color: var(--slate700);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.message-avatar .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.user-message .message-avatar {
  background: var(--accent);
  color: white;
  border: 0;
}
.user-message .message-avatar .icon {
  color: white;
}
.message-bubble {
  max-width: 80%;
  background: white;
  border: 1px solid rgba(226,232,240,.8);
  border-radius: 16px 16px 16px 2px;
  color: var(--slate800);
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.625;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  overflow-wrap: anywhere;
}
.user-message .message-bubble {
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 16px 16px 2px 16px;
}
.message-time {
  display: block;
  color: var(--slate400);
  font-size: 10px;
  line-height: 15px;
  margin-top: 4px;
}
.user-message .message-time {
  color: rgba(219,234,254,.8);
  text-align: right;
}
.typing-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}
.typing-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate400);
  animation: bounce 1s infinite;
}
.typing-dots i:nth-child(2) {
  animation-delay: .2s;
}
.typing-dots i:nth-child(3) {
  animation-delay: .4s;
}
.assistant-suggestions {
  padding: 8px 12px;
  background: white;
  border-top: 1px solid var(--slate100);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.assistant-suggestions::-webkit-scrollbar {
  display: none;
}
.assistant-suggestions button {
  background: var(--slate100);
  color: var(--slate700);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s;
}
.assistant-suggestions button:hover {
  background: var(--slate200);
}
.assistant-input-area {
  padding: 12px;
  background: white;
  border-top: 1px solid rgba(226,232,240,.8);
}
.assistant-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.assistant-form input {
  flex: 1;
  min-width: 0;
  background: #f8fafc;
  border: 1px solid var(--slate200);
  border-radius: 12px;
  color: var(--slate900);
  font-size: 14px;
  line-height: 20px;
  padding: 8px 16px;
  outline: none;
  transition: background .2s,border-color .2s;
}
.assistant-form input::placeholder {
  color: var(--slate400);
}
.assistant-form input:focus {
  background: white;
  border-color: var(--accent);
}
.assistant-form button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  transition: background .2s;
}
.assistant-form button:hover {
  background: var(--accent-hover);
}
.assistant-form button:disabled {
  opacity: .4;
}
.assistant-form .icon {
  width: 16px;
  height: 16px;
}
/* Time-based motion always reaches its final visible state on mobile. */
.entrance {
  opacity: 0;
  transform: translateY(16px);
  animation: entrance-up .7s var(--ease) var(--entrance-delay,0ms) both;
}
.site-header.entrance {
  animation: header-down .6s var(--ease) both;
}
.hero-title.entrance,
.hero-tagline.entrance {
  transform: translateY(20px);
}
.kicker-pill.entrance,
.hero-tags.entrance,
.hero-action.entrance {
  animation-duration: .6s;
}
.social-links.entrance {
  transform: none;
  animation: fade-in .6s ease var(--entrance-delay,0ms) both;
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s var(--ease) var(--reveal-delay,0ms),
              transform .65s var(--ease) var(--reveal-delay,0ms);
}
.diagram-frame.reveal {
  transform: translateY(28px);
  transition-duration: .75s;
}
.section-kicker.reveal {
  transform: translateY(14px);
  transition-duration: .5s;
}
.section-heading.reveal,
.contribution.reveal {
  transform: translateY(20px);
}
.contact-section.reveal {
  transform: translateY(24px);
}
.contact-row.reveal {
  transform: translateX(-12px);
  transition-duration: .45s;
}
[dir=rtl] .contact-row.reveal {
  transform: translateX(12px);
}
.contact-row.reveal.visible,
[dir=rtl] .contact-row.reveal.visible {
  transform: translate3d(0,0,0);
}
.site-footer.reveal {
  transform: translateY(16px);
}
.reveal.visible {
  opacity: 1;
  transform: translate3d(0,0,0);
}
@keyframes header-down {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes entrance-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dropdown-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
}
@keyframes tooltip-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes endpoint-pulse {
  0%,100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}
@keyframes ping {
  75%,100% {
    transform: scale(2);
    opacity: 0;
  }
}
@keyframes bounce {
  0%,100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(.8,0,1,1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0,0,.2,1);
  }
}
@keyframes slide-panel-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slide-panel-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(30px);
  }
}
@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes zoom-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(.95);
  }
}
.header-contact,
.desktop-languages {
  display: none;
}

@media (max-width: 320px) {
  .brand-link {
    gap: 7px;
  }
  .brand-text {
    font-size: 15px;
  }
  .menu-btn {
    width: 36px;
    height: 36px;
  }
  html[lang='en'] .contact-subheading {
    max-width: 240px;
  }
  .diagram-inner {
    padding: 14px;
  }
  .footer-links {
    gap: 18px;
  }
}

@media (min-width: 640px) {
  .site-header {
    padding-inline: 27px;
  }
  .header-island {
    min-height: 71.5px;
    padding: 13.5px 22.5px;
  }
  .brand-text {
    font-size: 20.25px;
    line-height: 31.5px;
  }
  .hero-shell {
    gap: 63px;
    padding: 99px 45px;
  }
  .hero-title {
    max-width: none;
    font-size: 67.5px;
  }
  .hero-tagline {
    max-width: 864px;
    font-size: 33.75px;
  }
  .hero-bio {
    max-width: 756px;
    font-size: 20.25px;
    line-height: 36px;
  }
  .diagram-frame {
    width: min(100%,576px);
    margin-inline: auto;
    padding: 22.5px;
  }
  .diagram-inner {
    padding: 26px;
  }
  .about-section {
    padding-block: 81px;
    padding-inline: max(36px,calc((100% - 1008px)/2 + 36px));
  }
  .diagram-narrative {
    margin-inline: auto;
    padding-inline-start: 36px;
  }
  .contribute-section {
    padding: 90px 36px;
  }
  .contribution {
    padding-block: 31.5px;
  }
  html[dir='rtl'] .diagram-narrative p+p {
    max-width: 600px;
  }
  .contact-section {
    padding: 99px 27px;
  }
  .assistant-overlay {
    align-items: center;
    padding: 24px;
  }
  .assistant-panel {
    width: 420px;
    height: 620px;
    max-height: 90vh;
    border-radius: 24px;
    animation-name: zoom-in;
  }
  .assistant-overlay.closing .assistant-panel {
    animation-name: zoom-out;
  }
}

@media (min-width: 768px) {
  .header-actions > .menu-btn {
    display: none;
  }
  .dropdown-nav {
    display: none;
  }
  .desktop-languages {
    display: inline-flex;
    gap: 0;
    padding: 4.5px;
    border: 1px solid var(--slate200);
    border-radius: 999px;
    background: #f3f5f7;
  }
  .desktop-languages button {
    min-height: 27px;
    padding: 4.5px 11.25px;
    border-radius: 999px;
    font-family: var(--serif);
    font-size: 13.5px;
    line-height: 18px;
    font-weight: 600;
    color: var(--slate700);
    transition: color .2s,background-color .2s,box-shadow .2s;
  }
  .desktop-languages button:hover {
    color: var(--ink);
  }
  .desktop-languages button[aria-pressed='true'] {
    color: var(--ink);
    background: white;
    box-shadow: 0 1px 4px rgba(13,21,41,.09);
  }
  .header-contact {
    display: inline-flex;
    min-height: 42.5px;
    padding: 9px 18px;
    border-radius: 999px;
    font-family: var(--serif);
    font-size: 15.75px;
    line-height: 22.5px;
    letter-spacing: .01em;
  }
  .diagram-narrative {
    margin-inline-start: 45px;
    margin-inline-end: auto;
  }
  .contribution {
    display: grid;
    grid-template-columns: 63px minmax(0,1fr);
    column-gap: 27px;
  }
  html[dir='rtl'] .contribution {
    direction: ltr;
  }
  .contribution-number {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }
  html[dir='rtl'] .contribution-number {
    grid-column: 1;
    order: initial;
    margin-top: 0;
  }
  .contribution h3,
  .contribution p {
    grid-column: 2;
  }
  html[dir='rtl'] .contribution h3,
  html[dir='rtl'] .contribution p {
    direction: rtl;
  }
  .site-footer {
    padding: 54px max(36px,calc((100% - 1296px)/2 + 36px));
  }
  .footer-main {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  html[dir='rtl'] .footer-main {
    flex-direction: row-reverse;
  }
  .footer-actions {
    align-items: flex-start;
  }
}

@media (min-width: 980px) and (max-width: 1179px) {
  html[lang='en'] .hero-title {
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .site-header {
    padding-inline: 45px;
  }
  .header-island {
    padding-inline: 27px;
  }
}

@media (min-width: 1180px) {
  .hero-shell {
    grid-template-columns: repeat(12,minmax(0,1fr));
    align-items: center;
    column-gap: 45px;
    row-gap: 63px;
    padding: 99px 54px;
  }
  .hero {
    grid-column: span 7;
    padding-inline-end: 45px;
  }
  .diagram-section {
    grid-column: span 5;
  }
  html[dir='rtl'] .hero {
    grid-column: 6 / span 7;
  }
  html[dir='rtl'] .diagram-section {
    grid-column: 1 / span 5;
  }
  .hero-title { font-size: 81px; }
  .hero-tagline {
    margin-top: 27px;
    font-size: 36.9px;
    line-height: 1.25;
  }
  .hero-bio { max-width: none; }
  .kicker-pill span:last-child {
    font-family: var(--serif);
    font-size: 11px;
    line-height: 16.5px;
  }
  .diagram-frame {
    width: 100%;
    max-width: none;
  }
  .diagram-inner {
    display: flex;
    height: 100%;
    flex-direction: column;
  }
  .diagram-svg-wrap {
    flex: 1;
  }
  .contribute-section {
    padding: 108px 45px;
  }
}

@media (min-width: 1440px) {
  .hero-tagline {
    max-width: 704.5px;
  }
}

@media (min-width: 1920px) {
  .site-header {
    max-width: 1904px;
  }
  .hero-shell {
    grid-template-columns: repeat(12,minmax(0,1fr));
    column-gap: 54px;
    min-height: 940px;
    padding-inline: 72px;
  }
  .hero-title {
    width: auto;
    font-size: 84px;
  }
  .hero-tagline {
    max-width: 780px;
  }
  .diagram-frame {
    max-width: 560px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .entrance,
  .reveal,
  .reveal.visible,
  .pulse-ring,
  .status-ping span:first-child,
  .typing-dots i,
  .overlay,
  .assistant-panel,
  .dropdown-nav {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  #flow-path {
    transition: none !important;
  }
}
