/* Adamant — built to the locked spec. Two colours, three font files, no third hue. */

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/SourceSerif4-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --primary: #f5f4f0;
  --ink: #0A0908;
  --ink-65: rgba(10, 9, 8, .65);
  --ink-45: rgba(10, 9, 8, .45);
  --ink-15: rgba(10, 9, 8, .15);

  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Source Serif 4", Georgia, serif;

  --col: 740px;          /* content column */
  --edge: 120px;         /* left margin, desktop */
  --rail: 20px;          /* rail offset left of the text edge */
  --gap: 56px;           /* vertical space between entries */
  --node: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--primary);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--col);
  margin: 0 24px 0 var(--edge);
  padding: 72px 0 120px;
}

/* ---------- header ---------- */

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.mark { display: block; width: auto; }
.mark--head { height: 34px; }
.mark--foot { height: 22px; flex: none; }

.nav { display: flex; gap: 28px; font-size: 16px; }

.nav a {
  text-decoration: none;
  padding-bottom: 2px;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- intro ---------- */

.intro {
  margin: 56px 0 0;
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.6;
}

/* ---------- timeline ---------- */

.timeline {
  list-style: none;
  margin: 96px 0 0;
  padding: 0;
}

.entry {
  --node-top: 7px;            /* plain: node centred on the title's first line */
  position: relative;
  margin-bottom: var(--gap);
}

.entry--featured { --node-top: 24px; }   /* card border 1px + 16px padding pushes the title down */

.entry:last-child { margin-bottom: 0; }

/* the node */
.entry::after {
  content: "";
  position: absolute;
  top: var(--node-top);
  left: calc(-1 * var(--rail) - var(--node) / 2);
  width: var(--node);
  height: var(--node);
  background: var(--ink);
}

/* the rail, drawn per entry so it bridges the gaps and stops at the end nodes */
.entry::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--rail));
  top: 0;
  bottom: calc(-1 * var(--gap));
  width: 1px;
  background: var(--ink-15);
}

.entry:first-child::before { top: calc(var(--node-top) + var(--node) / 2); }

.entry:last-child::before {
  bottom: auto;
  height: calc(var(--node-top) + var(--node) / 2);
}

/* entries are links to their milestone pages */
.entry-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.entry-link:hover .entry-title,
.entry-link:focus-visible .entry-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.entry--featured .entry-body {
  transition: transform .15s ease-out, box-shadow .15s ease-out;
}

.entry--featured .entry-link:hover .entry-body {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 0 var(--ink);
}

.entry--featured .entry-body {
  border: 1px solid var(--ink);
  background: var(--primary);
  padding: 16px;
  box-shadow: 6px 6px 0 0 var(--ink);
}

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.entry-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.entry-date {
  flex: none;
  font-size: 15px;
  color: var(--ink-45);
  line-height: 1.3;
}

.entry-desc {
  margin: 12px 0 0;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-65);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 96px;
  font-size: 16px;
  color: var(--ink-65);
}

.foot p { margin: 0; max-width: 62ch; }
.foot a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- subpages (milestones, OWL, research) ---------- */

.subpage { margin-top: 40px; }

.crumb { margin: 0 0 32px; font-size: 14px; }

.crumb a {
  color: var(--ink-65);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.page-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.milestone-desc {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-65);
}

.milestone-section { margin-top: 56px; }

.milestone-section h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.placeholder {
  border: 1px dashed var(--ink-45);
  padding: 28px 18px;
  font-size: 15px;
  color: var(--ink-65);
}

/* ---------- research ---------- */

.research-list {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
}

.research-item {
  border-top: 1px solid var(--ink-15);
  padding: 22px 0;
}

.research-item:last-child { border-bottom: 1px solid var(--ink-15); }

.research-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.research-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.research-status {
  flex: none;
  font-size: 13px;
  color: var(--ink-45);
}

.research-item p {
  margin: 10px 0 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-65);
}

/* ---------- team ---------- */

.team { margin-top: 96px; }

.team h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.team-intro {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--ink-65);
}

.team-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.team-member {
  border: 0;
  padding: 0 0 2px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.team-member:hover { color: var(--ink-65); }

.team-modal {
  width: min(380px, calc(100vw - 48px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--ink);
  background: var(--primary);
  color: var(--ink);
  box-shadow: 6px 6px 0 0 var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

.team-modal::backdrop { background: rgba(10, 9, 8, .45); }

.team-modal-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
}

.team-modal-role {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-45);
}

.team-modal-bio {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-65);
}

.team-modal-links {
  margin: 18px 0 0;
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.team-modal-links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.js .team-modal[open] { animation: confirm-in .25s ease-out; }

/* ---------- contact modal ---------- */

.contact-modal {
  width: min(440px, calc(100vw - 48px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--ink);
  background: var(--primary);
  color: var(--ink);
  box-shadow: 6px 6px 0 0 var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

.contact-modal::backdrop {
  background: rgba(10, 9, 8, .45);
}

.contact-form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.contact-modal-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.contact-close {
  border: 0;
  padding: 4px;
  background: none;
  color: var(--ink-65);
  font: inherit;
  cursor: pointer;
}

.contact-close:hover { color: var(--ink); }

.field {
  display: block;
  margin-bottom: 16px;
  border: 0;
  padding: 0;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-65);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ink-15);
  background: var(--primary);
  color: var(--ink);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--ink);
}

.field--role { margin-bottom: 20px; }

.field--role .field-label { margin-bottom: 8px; }

.role-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 24px;
  cursor: pointer;
}

.role-option input { accent-color: var(--ink); }

.contact-submit {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-submit:hover {
  background: var(--primary);
  color: var(--ink);
}

.contact-confirm {
  width: min(300px, calc(100vw - 48px));
  margin: auto;
  padding: 28px 24px;
  border: 1px solid var(--ink);
  background: var(--primary);
  color: var(--ink);
  box-shadow: 6px 6px 0 0 var(--ink);
  font-family: var(--mono);
  text-align: center;
}

.contact-confirm::backdrop {
  background: rgba(10, 9, 8, .45);
}

.mark--confirm {
  height: 44px;
  margin: 0 auto 14px;
}

.contact-confirm-msg {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.js .contact-confirm[open] {
  animation: confirm-in .25s ease-out;
}

@keyframes confirm-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- motion ---------- */

.js .reveal { opacity: 0; transform: translateY(8px); }

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease-out, transform .4s ease-out;
}

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  :root { --edge: 24px; --rail: 14px; }

  .wrap { margin-right: 24px; padding-top: 56px; }

  .wordmark { font-size: 26px; }
  .mark--head { height: 26px; }

  .head { gap: 20px; }
  .nav { gap: 22px; font-size: 15px; }

  .intro { font-size: 17px; margin-top: 40px; }
  .timeline { margin-top: 72px; }

  /* dates drop below the title rather than right-aligning */
  .entry-head { display: block; }
  .entry-title { font-size: 16px; }
  .entry-date { display: block; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal.is-in { transition: none; }
  .js .contact-confirm[open] { animation: none; }
  .js .team-modal[open] { animation: none; }
  .entry--featured .entry-body { transition: none; }
  html { scroll-behavior: auto; }
}
