/* ---------- Tokens ---------- */
:root {
  --ink: #0A0A0A;
  --ink-soft: #4A4A4A;
  --ink-mute: #6E6E6E;
  --paper: #FFFFFF;
  --paper-soft: #F5F5F5;
  --rule: #E5E5E5;
  --rule-strong: #CFCFCF;
  --brat: #8ACE00;
  --brat-deep: #6FA600;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 64px);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif-italic: "EB Garamond", Georgia, "Times New Roman", serif;

  --r-sm: 2px;
  --t-fast: 140ms cubic-bezier(.2,.7,.3,1);
  --t-med: 280ms cubic-bezier(.2,.7,.3,1);
}

@supports (font-variation-settings: normal) {
  :root { --sans: "Inter var", ui-sans-serif, system-ui, sans-serif; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
a { color: inherit; }
hr { border: 0; }

/* ---------- Base ---------- */
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--brat); color: var(--ink); }

a { text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brat);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule {
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.nav.is-scrolled { border-bottom-color: var(--rule); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.nav__mark {
  width: 12px;
  height: 12px;
  background: var(--brat);
  display: inline-block;
}
.nav__wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 15px;
}

.nav__links {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
}
.nav__links a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  padding: 6px 0;
  position: relative;
  transition: color var(--t-fast);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brat);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-med);
}
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { transform: scaleX(1); }

@media (max-width: 640px) {
  .nav__links { gap: 12px; }
  .nav__links a { font-size: 12px; }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}
.eyebrow__tick {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--brat);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(56px, 8vw, 112px);
  padding-bottom: clamp(56px, 8vw, 112px);
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* very subtle dotted texture in the corners */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.05) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 80% at 100% 0%, #000 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 100% 0%, #000 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.16;
  /* The headline sits in the upper-left; fade the graphic away from it
     so the type stays clean, and let the lines emerge into the right
     half of the hero where they sweep off-screen. Top and bottom also
     softly fade so the graphic never sits as a hard band. */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, transparent 18%, #000 58%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, transparent 18%, #000 58%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-art-drift 24s ease-in-out infinite alternate;
}
@keyframes hero-art-drift {
  0%   { transform: translateX(-6px); }
  100% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__art img { animation: none; }
}
@media (max-width: 960px) {
  .hero__art {
    opacity: 0.10;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
  }
}

.hero__title {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
  font-size: clamp(40px, 7vw, 88px);
  margin: 0 0 36px;
}

.hero__lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 40px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page head (subpage hero) ---------- */
.page-head {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.page-head__title {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
  font-size: clamp(34px, 5.4vw, 64px);
  margin: 0 0 24px;
  max-width: 22ch;
}
.page-head__lede {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 0 28px;
}
.page-head__lede a,
.eyebrow a {
  color: var(--ink);
  border-bottom: 1px solid var(--brat);
  transition: background var(--t-fast);
}
.page-head__lede a:hover,
.eyebrow a:hover { background: rgba(138, 206, 0, 0.18); }
.page-head__meta {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--brat); color: var(--ink); border-color: var(--brat); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--brat); color: var(--ink); border-color: var(--brat); }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brat);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(138, 206, 0, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(138, 206, 0, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(138, 206, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(138, 206, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}

/* ---------- Section ---------- */
.section {
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: clamp(72px, 10vw, 128px);
}

.section__head {
  margin-bottom: clamp(40px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section__title {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  font-size: clamp(28px, 4vw, 48px);
  margin: 0;
  max-width: 22ch;
}

.section__label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.section__label .num { color: var(--ink); }
.section__label .slash { color: var(--brat); font-weight: 600; }

.section__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 800px) {
  .section__grid { grid-template-columns: 1fr; gap: 16px; }
}

.prose p {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 1em;
  max-width: 62ch;
}
.prose p:last-child { margin-bottom: 0; }
.prose em {
  font-style: normal;
  background: linear-gradient(transparent 65%, rgba(138, 206, 0, 0.35) 65%);
  padding: 0 2px;
}
.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--brat);
  transition: background var(--t-fast);
}
.prose a:hover { background: rgba(138, 206, 0, 0.18); }

/* ---------- Cards (Research) ---------- */
.cards {
  display: grid;
  gap: 24px;
}
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cards--3 { grid-template-columns: 1fr; }
  .cards--4 { grid-template-columns: 1fr; }
}

.quadrant-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  vertical-align: 2px;
  white-space: nowrap;
}

.card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-med), transform var(--t-med);
}
.card:hover { border-color: var(--ink); }

.card__photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-soft);
  margin: -24px -24px 24px;
  border-bottom: 1px solid var(--rule);
}
.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) contrast(1.02);
  transition: filter var(--t-med);
}
.card:hover .card__photo img { filter: grayscale(0.5) contrast(1.04); }

.card__title {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.card__tagline {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 18px;
  line-height: 1.45;
}
.card__role {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-mute);
  margin: 0 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.card__role .role-name { color: var(--ink); font-weight: 600; }

.card__bio {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}
.card__link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
  border-bottom: 1px solid var(--brat);
}
.card__link:hover { background: rgba(138, 206, 0, 0.18); }
.card__link--inline {
  font-size: inherit;
  font-weight: inherit;
  color: var(--ink);
}

/* ---------- Advisors ---------- */
.advisors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 32px;
}
@media (max-width: 960px) { .advisors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 700px) { .advisors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }

.advisor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.advisor__photo {
  aspect-ratio: 1 / 1;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.advisor__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) contrast(1.02);
  transition: filter var(--t-med);
}
.advisor:hover .advisor__photo img { filter: grayscale(0.4); }
.advisor__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.advisor__name a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.advisor__name a:hover { border-bottom-color: var(--brat); }
.advisor__bio {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 4px 0 0;
}
.advisor__bio em { font-style: italic; }
.advisor__link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.advisor__link:hover .advisor__photo img { filter: grayscale(0.4); }
.advisor__link:hover .advisor__name {
  border-bottom: 1px solid var(--brat);
  align-self: flex-start;
}

/* ---------- Sponsor narrow section ---------- */
.section--narrow {
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(56px, 7vw, 88px);
}

/* ---------- Careers ---------- */
.careers {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 800px) { .careers { grid-template-columns: 1fr; } }

.careers__body { max-width: 64ch; }

.pill {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  background: var(--brat);
  color: var(--ink);
  padding: 6px 12px;
  margin-bottom: 20px;
}

.careers__role {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0 0 24px;
}

.careers__lede {
  font-size: clamp(17px, 1.3vw, 19px);
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 36px;
  max-width: 60ch;
}

.careers__how {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.careers__role-block + .careers__role-block {
  margin-top: 64px;
  padding-top: 56px;
  border-top: 1px solid var(--rule);
}

.pill--muted {
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid var(--rule-strong);
}

.careers__closer {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}
.careers__lede a {
  color: var(--ink);
  border-bottom: 1px solid var(--brat);
  transition: background var(--t-fast);
}
.careers__lede a:hover { background: rgba(138, 206, 0, 0.18); }

.careers__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.careers__steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}
.careers__steps li:last-child {
  border-bottom: none;
}
.step__num { color: var(--ink-mute); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0;
  margin-top: 32px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}
.footer__line {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.footer__line a {
  color: var(--ink);
  border-bottom: 1px solid var(--brat);
  transition: background var(--t-fast);
}
.footer__line a:hover { background: rgba(138, 206, 0, 0.18); }
.footer__sep {
  color: var(--brat);
  font-weight: 600;
  user-select: none;
}
.footer__umma {
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
}
.footer__umma[lang="ar"] {
  font-family: var(--sans);
  font-style: normal;
  font-size: 16px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--t-med), transform 600ms var(--t-med);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Safety net: footer must always be visible. The reveal animation is unreliable
   for small elements at the very bottom of the document, so opt the footer
   out unconditionally even if a stale build re-adds the class. */
.footer__inner,
.footer__inner.reveal {
  opacity: 1 !important;
  transform: none !important;
}
