/* Til Jordan — tiljordan.com
   One typeface (IBM Plex Serif), one quiet column, one loud door. */

@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #fbfbf9;
  --ink: #1c201e;
  --muted: #5b625e;
  --rule: #dfe2dd;
  --link: #1d5a43;
  --focus: #b8862f;

  /* the door: a London front door */
  --door: #1f4b3a;
  --door-recess: #173a2d;
  --door-edge: #2b6150;
  --brass: #c09543;
  --brass-dark: #7d5e22;
  --stone: #ece8e0;
  --stone-line: #cfc9bc;
  --step: #d9d3c6;
  --glass: #d5dfe1;
  --number: #a27a2e;
  --bars: #f7f5f0;
  --outside-top: #dfe7ea;
  --outside-bottom: #f1f3f2;
  --sheet: #ffffff;
  --sheet-edge: #aeb7ba;
  --sheet-ink: #4a5250;
  --sheet-text: #b9c1c3;
  --clip: #2b2f2e;

  --measure: 36rem;
  color-scheme: only light;
}


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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1rem;
  line-height: 1.68;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.page, .colophon {
  width: 100%;
  max-width: calc(var(--measure) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page { padding-top: clamp(3rem, 10vh, 7rem); }

p { margin: 0 0 1rem; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

b { font-weight: 600; }

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

h1 {
  font-size: 2.4rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.018em;
  margin: 0 0 1.25rem;
}

.lede {
  font-size: 1.36rem;
  line-height: 1.4;
  letter-spacing: -.006em;
  margin: 0 0 1.4rem;
  max-width: 25em;
  text-wrap: balance;
}

.links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: 1.4rem 0 0; }

/* ---------- the door ---------- */

.doorstep {
  --s: .9;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.75rem;
  margin: 3rem 0 0;
}
.doorstep[hidden] { display: none; }

.door {
  position: relative;
  width: calc(132px * var(--s));
  height: calc(226px * var(--s));
  perspective: calc(420px * var(--s));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.door[data-state="open"], .door[data-state="ajar"] { cursor: default; }

/* The opening the leaf fills: x 8–104, y 60–210 of the frame's viewBox (-10 -6 132 226). */
.door-outside, .door-leaf {
  position: absolute;
  left: calc(18px * var(--s));
  top: calc(66px * var(--s));
  width: calc(96px * var(--s));
  height: calc(150px * var(--s));
}

.door-outside {
  background: linear-gradient(var(--outside-top), var(--outside-bottom));
  overflow: hidden;
}
.door-outside svg { display: block; width: 100%; height: 100%; }

/* What's waiting outside: the whole paper, or after the concession, one card. */
.sheet { fill: var(--sheet); stroke: var(--sheet-edge); stroke-width: .7; }
.sheet-title { stroke: var(--sheet-ink); stroke-width: 1.6; stroke-linecap: round; }
.sheet-text { stroke: var(--sheet-text); stroke-width: 1.1; stroke-linecap: round; }
.clip { fill: var(--clip); }
.clip-wire { fill: none; stroke: var(--clip); stroke-width: 1; }
.offer-small { display: none; }
.door[data-offer="small"] .offer-big { display: none; }
.door[data-offer="small"] .offer-small { display: inline; }

.door-leaf {
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform .9s cubic-bezier(.2, .75, .25, 1);
  will-change: transform;
}
.door-leaf svg { display: block; width: 100%; height: 100%; }
.door-leaf::after {           /* the leaf darkens as it turns away from the light */
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}

.leaf { fill: var(--door); }
.panel rect { fill: var(--door-recess); }
.panel .field { fill: var(--door); stroke: var(--door-edge); stroke-width: .8; }
.brass { fill: var(--brass); }
.brass-ring { fill: none; stroke: var(--brass); stroke-width: 1.8; }
.slot { fill: var(--brass-dark); }

.door-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.door-frame .stone { fill: var(--stone); stroke: var(--stone-line); stroke-width: .8; }
.door-frame .glass { fill: var(--glass); }
.door-frame .bars { fill: none; stroke: var(--bars); stroke-width: 1.6; stroke-linecap: round; }
.door-frame .keystone { fill: var(--stone); stroke: var(--stone-line); stroke-width: .8; }
.door-frame .step { fill: var(--step); }
.door-frame .number {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 8.4px;
  font-weight: 600;
  fill: var(--number);
  letter-spacing: .04em;
}

/* states, set by door.js */
.door[data-state="open"] .door-leaf { transform: rotateY(74deg); }
.door[data-state="open"] .door-leaf::after { opacity: .38; }
.door[data-state="ajar"] .door-leaf { transform: rotateY(50deg); transition-duration: .6s; }
.door[data-state="ajar"] .door-leaf::after { opacity: .24; }
.door[data-state="slammed"] .door-leaf { transition: transform .16s cubic-bezier(.55, 0, 1, .45); }
.door[data-state="slammed"] { animation: thud .32s .15s ease-out; }
.door[data-state="knock"] .door-leaf { animation: knock .7s ease-in-out; }
.door[data-state="shut"] .door-leaf { transition-duration: .6s; }
.door.hint .door-leaf { animation: knock .7s ease-in-out; }

@keyframes thud {
  0%   { transform: translate(0, 0); }
  18%  { transform: translate(-2.5px, .5px); }
  36%  { transform: translate(2px, -.5px); }
  54%  { transform: translate(-1.2px, 0); }
  72%  { transform: translate(.8px, 0); }
  100% { transform: translate(0, 0); }
}
@keyframes knock {
  0%, 100% { transform: rotateY(0deg); }
  12%  { transform: rotateY(2.4deg); }
  24%  { transform: rotateY(0deg); }
  40%  { transform: rotateY(2.4deg); }
  52%  { transform: rotateY(0deg); }
}

.door-talk { min-height: 9.5rem; display: flex; flex-direction: column; justify-content: center; }
.door-line { margin: 0 0 .9rem; max-width: 30em; }
.door-line .aside { font-style: italic; color: var(--muted); }
.door-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.door-actions button, .door-actions .button {
  font: inherit;
  font-size: .92rem;
  line-height: 1.2;
  color: var(--link);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--link) 45%, transparent);
  border-radius: 3px;
  padding: .5rem .95rem .55rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.door-actions button:hover, .door-actions .button:hover {
  border-color: var(--link);
  background: color-mix(in srgb, var(--link) 8%, transparent);
}
.door-actions .quiet {
  border-color: transparent;
  padding-left: .4rem;
  padding-right: .4rem;
  color: var(--muted);
}

/* ---------- sections ---------- */

section { margin-top: 4.25rem; }

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1.1rem;
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  margin: 2.5rem 0 .75rem;
}

.papers, .plain, .timeline, .posts { list-style: none; margin: 0; padding: 0; }

.papers { margin-top: 2.25rem; }
.papers li { margin: 0 0 2.2rem; }
.papers li:target .title { background: color-mix(in srgb, var(--focus) 18%, transparent); }
.papers .title { font-size: 1.05rem; font-weight: 500; line-height: 1.45; display: inline; }
.papers p { margin: .35rem 0 0; }
.papers .meta { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.papers .gist { font-size: .95rem; }
.papers .more { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; font-size: .9rem; }

/* the one result worth remembering, set as a two-row table */
.result {
  width: 100%;
  max-width: 30rem;
  border-collapse: collapse;
  margin: .8rem 0 .25rem;
  font-size: .95rem;
  line-height: 1.5;
}
.result caption {
  caption-side: top;
  text-align: left;
  color: var(--muted);
  font-size: .86rem;
  padding: 0 0 .3rem;
}
.result td { padding: .1rem 0; vertical-align: baseline; }
.result .num {
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
  padding-right: .8rem;
  white-space: nowrap;
  width: 1%;
}
.result tr + tr td { border-top: 1px solid var(--rule); }

.plain li { margin: 0 0 .85rem; font-size: .95rem; }
.plain .item { font-weight: 500; }

.timeline li {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  gap: 0 1rem;
  margin: 0 0 1rem;
  font-size: .95rem;
}
.timeline .when { color: var(--muted); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

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

.colophon {
  margin-top: 5rem;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.65;
}
.colophon p { border-top: 1px solid var(--rule); padding-top: 1.5rem; max-width: 34em; }
.colophon a { color: inherit; }

/* ---------- small screens ---------- */

@media (min-width: 46rem) {
  body { font-size: 1.0625rem; }
}

@media (max-width: 30rem) {
  h1 { font-size: 2.05rem; }
  .lede { font-size: 1.22rem; }
  .doorstep { --s: .62; gap: 1.1rem; align-items: start; }
  .door-talk { min-height: 0; }
  .timeline li { grid-template-columns: 4.4rem 1fr; gap: 0 .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .door-leaf, .door-leaf::after { transition-duration: .01s !important; }
  .door, .door-leaf { animation: none !important; }
  a { transition: none; }
}

@media print {
  .doorstep, .try-door { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}
