@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Inter:wght@400;500;600&family=Nothing+You+Could+Do&display=swap');

:root {
  --paper: #f4f1e9;
  --paper-light: #faf8f2;
  --ink: #171714;
  --soft-ink: #3f3e39;
  --muted: #77746c;
  --line: #c8c3b7;
  --accent: #174d8c;

  --serif: Georgia, "Times New Roman", serif;
  --sans: "Inter", Arial, sans-serif;
  --mono: "DM Mono", monospace;
  --hand: "Nothing You Could Do", cursive;

  --max: 1320px;
}


/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  width: min(calc(100% - 80px), var(--max));
  margin: 0 auto;
}

.section {
  border-bottom: 1px solid var(--line);
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--muted);
}


/* =========================
   HEADER
========================= */

.site-header {
  width: min(calc(100% - 80px), var(--max));
  margin: 0 auto;
  padding-top: 30px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding-bottom: 19px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -.7px;
}

.wordmark span {
  margin-left: 9px;

  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
}

.handwritten {
  font-family: var(--hand);
  color: var(--accent);
  font-size: 18px;

  animation: noteIn .7s .2s ease both;
  transform-origin: right center;
}

.header-rule {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--ink);
}


/* =========================
   NAVIGATION
========================= */

.nav {
  min-height: 62px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 42px;
}

.nav a {
  position: relative;

  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .25px;
  text-transform: uppercase;
}

.nav a::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -7px;

  width: 0;
  height: 1px;

  background: var(--ink);

  transition: width .2s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.main-site-link::after {
  display: none;
}

.main-site-link {
  font-size: 12px !important;
}

.main-site-link::before {
  content: "↗ ";
}


/* =========================
   HERO
========================= */

.hero {
  min-height: 590px;

  display: grid;
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(280px, .6fr);

  align-items: center;
  gap: 90px;

  padding-top: 70px;
  padding-bottom: 80px;
}

.hero > div {
  animation:
    heroIn .7s cubic-bezier(.2,.7,.2,1) both;
}

.issue {
  margin-bottom: 40px;

  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 0;

  font-family: var(--serif);
  font-size: clamp(62px, 6.6vw, 104px);
  font-weight: 400;
  line-height: .93;
  letter-spacing: -5px;
}

.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}

.hero-side {
  padding-top: 85px;

  animation:
    heroSideIn .85s .1s
    cubic-bezier(.2,.7,.2,1) both;
}

.scribble {
  margin-bottom: 30px;

  font-family: var(--hand);
  color: var(--accent);
  font-size: 25px;
  line-height: 1.35;

  transform: rotate(-2deg);
}

.hero-description {
  max-width: 340px;
  margin: 0 0 31px;

  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--soft-ink);
}


/* =========================
   TEXT LINKS
========================= */

.text-link {
  display: inline-block;
  position: relative;

  padding-bottom: 5px;

  border-bottom: 1px solid var(--ink);

  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .7px;
  text-transform: uppercase;

  transition:
    color .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateX(3px);
}


/* =========================
   CURRENT EXPERIMENT
========================= */

.current {
  display: grid;

  grid-template-columns:
    145px
    minmax(0, 1fr)
    310px;

  gap: 55px;

  padding-top: 68px;
  padding-bottom: 75px;
}

.experiment-number {
  margin-top: 18px;

  font-family: var(--serif);
  font-size: 80px;
  line-height: 1;
  letter-spacing: -4px;

  color: var(--accent);
}

.current-copy h2 {
  max-width: 700px;

  margin: 16px 0 25px;

  font-family: var(--serif);
  font-size: clamp(44px, 4vw, 64px);
  line-height: 1;
  letter-spacing: -2.5px;
  font-weight: 400;
}

.current-copy p {
  max-width: 620px;

  margin: 0 0 31px;

  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;

  color: var(--soft-ink);
}

.current-meta {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.meta-row {
  padding-bottom: 18px;
  margin-bottom: 18px;

  border-bottom: 1px solid var(--line);
}

.meta-label {
  display: block;

  margin-bottom: 7px;

  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;

  color: var(--muted);
}

.meta-value {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
}


/* =========================
   WHY LABS
========================= */

.manifesto {
  display: grid;
  grid-template-columns: .8fr 1.2fr;

  gap: 100px;

  padding-top: 80px;
  padding-bottom: 85px;
}

.manifesto h2 {
  max-width: 540px;

  margin: 17px 0 0;

  font-family: var(--serif);
  font-size: clamp(44px, 4.2vw, 65px);
  line-height: 1.02;
  letter-spacing: -2.7px;
  font-weight: 400;
}

.manifesto-copy {
  max-width: 680px;
}

.manifesto-copy p {
  margin: 0 0 25px;

  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.72;

  color: var(--soft-ink);
}

.margin-note {
  margin-top: 40px;

  font-family: var(--hand);
  font-size: 21px;

  color: var(--accent);

  transform: rotate(-2deg);
}


/* =========================
   LAB NOTEBOOK
========================= */

.lab-index {
  padding-top: 74px;
  padding-bottom: 82px;
}

.index-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 34px;
}

.index-heading h2 {
  margin: 0;

  font-family: var(--serif);
  font-size: 46px;
  font-weight: 400;
  letter-spacing: -1.5px;
}


/* Each experiment */

.index-row {
  display: grid;

  grid-template-columns:
    55px
    185px
    minmax(0, 1fr)
    145px;

  gap: 24px;
  align-items: center;

  padding: 27px 0;

  border-top: 1px solid var(--line);

  transition:
    color .18s ease,
    padding-left .18s ease;
}

.index-row:last-child {
  border-bottom: 1px solid var(--line);
}


/* 01 / 02 / 03 */

.index-no {
  font-family: var(--serif);

  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.7px;

  color: var(--ink);
}


/* MEDICAL AI / DATA / ETC */

.index-topic {
  font-family: var(--mono);

  font-size: 10px;
  font-weight: 400;

  line-height: 1.4;
  letter-spacing: .8px;

  text-transform: uppercase;

  color: var(--muted);
}


/* Main question */

.index-title {
  font-family: var(--serif);

  font-size: 25px;
  line-height: 1.25;

  letter-spacing: -.35px;
}


/* Status */

.index-status {
  text-align: right;

  font-family: var(--mono);

  font-size: 9px;
  font-weight: 500;

  line-height: 1.4;
  letter-spacing: .6px;

  text-transform: uppercase;

  color: var(--ink);
}

.live {
  color: var(--accent);
}


/* Only LIVE experiments should feel interactive */

a.index-row {
  cursor: pointer;
}

a.index-row:hover {
  padding-left: 7px;
}

a.index-row:hover .index-title {
  color: var(--accent);
}

a.index-row .index-status {
  transition: transform .18s ease;
}

a.index-row:hover .index-status {
  transform: translateX(4px);
}


/* MOBILE */

@media (max-width: 850px) {

  .lab-index {
    padding-top: 55px;
    padding-bottom: 65px;
  }

  .index-heading h2 {
    font-size: 39px;
  }

  .index-row {
    grid-template-columns: 38px 1fr;

    gap: 7px 15px;

    padding: 25px 0;
  }

  .index-no {
    grid-row: 1 / 4;

    font-size: 19px;
  }

  .index-topic {
    grid-column: 2;

    font-size: 9px;
  }

  .index-title {
    grid-column: 2;

    font-size: 23px;
  }

  .index-status {
    grid-column: 2;

    text-align: left;

    margin-top: 5px;
  }

  a.index-row:hover {
    padding-left: 0;
  }

}

/* Individual notebook row */

.index-row {
  display: grid;

  grid-template-columns:
    95px
    205px
    minmax(0, 1fr)
    170px;

  gap: 30px;

  align-items: center;

  min-height: 112px;
  padding: 30px 0;

  border-top: 1px solid var(--line);

  transition:
    padding-left .2s ease,
    color .2s ease;
}

.index-row:last-child {
  border-bottom: 1px solid var(--line);
}


/* 01 / 02 / 03 / 04 */

.index-no {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -1.5px;

  color: var(--ink);
}


/* MEDICAL AI / DIAGNOSTICS */

.index-topic {
  font-family: var(--mono);

  font-size: 13px;
  font-weight: 500;

  letter-spacing: .7px;
  text-transform: uppercase;

  color: var(--muted);
}


/* Experiment question */

.index-title {
  font-family: var(--serif);

  font-size: 30px;
  line-height: 1.22;

  letter-spacing: -.5px;
}


/* Status */

.index-status {
  text-align: right;

  font-family: var(--mono);

  font-size: 11px;
  font-weight: 500;

  letter-spacing: .6px;
  text-transform: uppercase;
}

.live {
  color: var(--accent);
}


/* Interactive notebook row */

a.index-row:hover {
  padding-left: 12px;
}

a.index-row:hover .index-title {
  color: var(--accent);
}

a.index-row .index-status {
  transition: transform .2s ease;
}

a.index-row:hover .index-status {
  transform: translateX(5px);
}


/* =========================
   FOOTER
========================= */

footer {
  padding: 48px 0 58px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 35px;

  font-family: var(--mono);

  font-size: 12px;
  font-weight: 500;

  line-height: 1.7;
  letter-spacing: .35px;

  text-transform: uppercase;

  color: var(--soft-ink);
}

.footer-inner > div:first-child {
  font-family: var(--serif);

  font-size: 17px;
  font-weight: 600;

  line-height: 1.5;

  text-transform: none;
  letter-spacing: 0;

  color: var(--ink);
}


/* =========================
   ANIMATION
========================= */

@keyframes heroIn {

  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes heroSideIn {

  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes noteIn {

  from {
    opacity: 0;
    transform:
      translateY(5px)
      rotate(-2deg);
  }

  to {
    opacity: 1;
    transform:
      translateY(0)
      rotate(-1deg);
  }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 850px) {

  .wrap,
  .site-header {
    width: calc(100% - 36px);
  }


  /* Header */

  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .wordmark {
    font-size: 25px;
  }

  .handwritten {
    font-size: 15px;
  }


  /* Navigation */

  .nav {
    min-height: 58px;
    overflow-x: auto;
  }

  .nav-links {
    min-width: max-content;
    gap: 25px;
  }

  .nav a {
    font-size: 11px;
  }

  .main-site-link {
    display: none;
  }


  /* Hero */

  .hero {
    min-height: auto;

    grid-template-columns: 1fr;

    gap: 15px;

    padding-top: 55px;
    padding-bottom: 65px;
  }

  .hero h1 {
    font-size: 57px;
    letter-spacing: -3px;
  }

  .hero-side {
    padding-top: 35px;
  }


  /* Current experiment */

  .current {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .experiment-number {
    font-size: 60px;
  }

  .current-meta {
    padding: 25px 0 0;

    border-left: 0;
    border-top: 1px solid var(--line);
  }


  /* Manifesto */

  .manifesto {
    grid-template-columns: 1fr;
    gap: 45px;
  }


  /* Notebook */

  .index-heading h2 {
    font-size: 42px;
  }

  .index-row {
    grid-template-columns: 55px 1fr;

    gap: 12px 18px;

    min-height: 0;

    padding: 30px 0;
  }

  .index-no {
    font-size: 25px;
  }

  .index-topic {
    grid-column: 2;

    font-size: 11px;
  }

  .index-title {
    grid-column: 2;

    font-size: 25px;
  }

  .index-status {
    grid-column: 2;

    text-align: left;

    font-size: 10px;
  }

  a.index-row:hover {
    padding-left: 0;
  }


  /* Footer */

  .footer-inner {
    flex-direction: column;

    font-size: 10px;
  }

  .footer-inner > div:first-child {
    font-size: 16px;
  }

}


/* Respect reduced-motion settings */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

}