html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  font-family: "Atkinson Hyperlegible", sans-serif;
}

body {
  margin: 0;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
  display: block;
}

audio, canvas, progress, video {
  vertical-align: baseline;
  display: inline-block;
}

audio:not([controls]) {
  height: 0;
  display: none;
}

[hidden], template {
  display: none;
}

a {
  background-color: #0000;
}

a:active, a:hover {
  outline: 0;
}

abbr[title] {
  border-bottom: 1px dotted;
}

b, strong {
  font-weight: bold;
}

dfn {
  font-style: italic;
}

h1 {
  margin: .67em 0;
  font-size: 2em;
}

mark {
  color: #000;
  background: #ff0;
}

small {
  font-size: 80%;
}

sub, sup {
  vertical-align: baseline;
  font-size: 75%;
  line-height: 0;
  position: relative;
}

sup {
  top: -.5em;
}

sub {
  bottom: -.25em;
}

img {
  border: 0;
}

svg:not(:root) {
  overflow: hidden;
}

hr {
  box-sizing: content-box;
  height: 0;
}

pre {
  overflow: auto;
}

code, kbd, pre, samp {
  font-family: monospace;
  font-size: 1em;
}

button, input, optgroup, select, textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}

button {
  overflow: visible;
}

button, select {
  text-transform: none;
}

button, html input[type="button"], input[type="reset"] {
  -webkit-appearance: button;
  cursor: pointer;
}

button[disabled], html input[disabled] {
  cursor: default;
}

button::-moz-focus-inner, input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

input {
  line-height: normal;
}

input[type="checkbox"], input[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

input[type="search"] {
  -webkit-appearance: none;
}

input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

legend {
  border: 0;
  padding: 0;
}

textarea {
  overflow: auto;
}

optgroup {
  font-weight: bold;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td, th {
  padding: 0;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  color: #333;
  background-color: #fff;
  min-height: 100%;
  margin: 0;
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-size: 14px;
  line-height: 20px;
}

img {
  vertical-align: middle;
  max-width: 100%;
  display: inline-block;
}

html[data-w-dynpage] [data-w-cloak] {
  color: #0000 !important;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 10px;
  font-weight: bold;
}

h1 {
  margin-top: 20px;
  font-size: 38px;
  line-height: 44px;
}

h2 {
  margin-top: 20px;
  font-size: 32px;
  line-height: 36px;
}

h3 {
  margin-top: 20px;
  font-size: 24px;
  line-height: 30px;
}

h4 {
  margin-top: 10px;
  font-size: 18px;
  line-height: 24px;
}

h5 {
  margin-top: 10px;
  font-size: 14px;
  line-height: 20px;
}

h6 {
  margin-top: 10px;
  font-size: 12px;
  line-height: 18px;
}

p {
  margin-top: 0;
  margin-bottom: 10px;
}

blockquote {
  border-left: 5px solid #e2e2e2;
  margin: 0 0 10px;
  padding: 10px 20px;
  font-size: 18px;
  line-height: 22px;
}

figure {
  margin: 0 0 10px;
}

figcaption {
  text-align: center;
  margin-top: 5px;
}

ul, ol {
  margin-top: 0;
  margin-bottom: 10px;
  padding-left: 40px;
}

.w-embed:before, .w-embed:after {
  content: " ";
  grid-area: 1 / 1 / 2 / 2;
  display: table;
}

.w-embed:after {
  clear: both;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

button, [type="button"], [type="reset"] {
  cursor: pointer;
  -webkit-appearance: button;
  border: 0;
}

label {
  margin-bottom: 5px;
  font-weight: bold;
  display: block;
}

.w-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

.w-container:before, .w-container:after {
  content: " ";
  grid-area: 1 / 1 / 2 / 2;
  display: table;
}

.w-container:after {
  clear: both;
}

@media screen and (max-width: 991px) {
  .w-container {
    max-width: 728px;
  }
}

@media screen and (max-width: 479px) {
  .w-container {
    max-width: none;
  }
}

[data-nav-menu-open] {
  text-align: center;
  background: #c8c8c8;
  min-width: 200px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  overflow: visible;
  display: block !important;
}

@keyframes spin {
  0% {
  transform: rotate(0);
  }
  100% {
  transform: rotate(360deg);
  }
}

/* Site colours. --blackish/--snow are the dark cards and their text in both themes;
   the rest swap for dark mode (theme.js sets data-theme on <html>, dark unless the visitor picked light). */

:root {
  --blackish: #1d1d1f;
  --snow: snow;
  --bg: #fff;
  --fg: #000;
  --text: #333;
  --link: #0000ee;
  --visited: #551a8b;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121212;
  --fg: #e6e6e6;
  --text: #e6e6e6;
  --link: #8ab4f8;
  --visited: #c58af9;
  color-scheme: dark;
}

.w-layout-blockcontainer {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

@media screen and (max-width: 991px) {
  .w-layout-blockcontainer {
    max-width: 728px;
  }
}

@media screen and (max-width: 767px) {
  .w-layout-blockcontainer {
    max-width: none;
  }
}

body {
  color: var(--text);
  background-color: var(--bg);
  flex-flow: column;
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
}

h2 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 32px;
  font-weight: bold;
  line-height: 36px;
}

a {
  text-decoration: underline;
}

.div-block {
  flex-flow: row;
  justify-content: space-around;
  align-items: center;
}

.div-block.thumbnail-link {
  grid-column-gap: 0%;
  grid-row-gap: 0%;
  flex-flow: column;
  flex: 0 auto;
  justify-content: space-around;
  align-items: center;
  width: 25%;
  margin: 2.5%;
  display: flex;
}

.div-block.thumbnail-link.timeline {
  width: 23.125%;
}

.div-block.title-description-and-release-date {
  flex-flow: column;
  align-items: flex-start;
  width: 65%;
  margin: 2.5%;
  display: flex;
}

.div-block.title-description-and-release-date.timeline {
  width: 46.25%;
}

.div-block.content-card {
  color: var(--snow);
  background-color: var(--blackish);
  flex-flow: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
}

.image {
  width: 100%;
}

.image.thumbnail {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 50%;
  max-width: 50%;
  margin: 5%;
  display: block;
}

.section {
  color: var(--snow);
  background-color: var(--blackish);
  flex-flow: column;
  justify-content: flex-end;
  align-items: stretch;
  margin-top: auto;
}

.timeline-details {
  color: var(--snow);
  font-size: 14px;
  background-color: #444242;
  width: 23.125%;
  padding: 2.5%;
}

.timeline-block {
  flex-flow: row;
  justify-content: center;
  align-items: center;
  display: flex;
  position: static;
}

.timeline-core {
  background-color: #fa0;
  flex-flow: column;
  flex: 0 auto;
  justify-content: center;
  align-self: center;
  align-items: center;
  width: 7.5%;
  height: 100%;
  display: flex;
}

.timeline-blurb {
  color: var(--blackish);
  text-align: center;
  background-color: #bbb;
  flex-flow: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
}

.text-block {
  text-align: center;
}

.timeline-spacer {
  width: 3%;
}

.text-block-3 {
  justify-content: center;
  align-items: center;
  padding-left: 5%;
  padding-right: 5%;
  font-size: 20px;
  display: flex;
}

.div-block-3 {
  width: 50%;
  margin: 5%;
}

.timeline-container {
  flex-flow: row;
  justify-content: center;
  align-items: stretch;
  max-width: 1800px;
  display: flex;
}

.events-holder {
  width: 43.25%;
}

.event-title {
  margin-bottom: 20px;
  font-size: 18px;
}

.new-timeline-block {
  display: flex;
}

.month, .year {
  color: var(--blackish);
}

.month {
  justify-content: center;
  align-items: center;
  width: 75px;
  height: 75px;
  display: flex;
}

.month.dark {
  background-color: #ffb700;
}

.month.light {
  background-color: #fcd126;
}

.year {
  justify-content: center;
  align-items: center;
  width: 75px;
  height: 900px;
  display: flex;
}

.year.dark {
  background-color: #ffc400;
}

.code-embed {
  width: 100%;
  height: 100vh;
}

/* Title tiles on the home page: dark cards like the rest of the site */

@media screen and (max-width: 479px) {
  .div-block.thumbnail-link, .div-block.thumbnail-link.timeline, .div-block.title-description-and-release-date, .div-block.title-description-and-release-date.timeline {
    width: 90%;
  }

  .div-block.content-card {
    flex-flow: column;
  }

  .timeline-details {
    width: 90%;
  }
}

/* Atkinson Hyperlegible is the site's typeface everywhere (same as kasperbielecki.com),
   kept in assets/fonts/ (Latin letters only; anything else falls back to sans-serif).
   The html/body rules above point at it; form controls don't inherit fonts by default, so they're told to. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Header, modelled on kasperbielecki.com: bold name, links separated by dots, a thin rule under it.
   Replaces the old Webflow navbar; the links wrap on small screens instead of hiding in a menu. */

.site-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--fg);
  line-height: 1.4;
  color: var(--fg);
}

/* Page width: every container lines up with the header text, with a 20px gutter on small screens */

.w-container, .w-layout-blockcontainer {
  max-width: 980px;
  padding-left: 20px;
  padding-right: 20px;
}

/* Long URLs wrap instead of running off the page */

.w-container {
  overflow-wrap: break-word;
}

/* Footer credit: a small line instead of a page-sized heading */

.section h1 {
  margin: 24px 0;
  font-size: 18px;
  line-height: 1.4;
}

.site-header .site-name {
  font-size: 1.5em;
  font-weight: bold;
  color: inherit;
  text-decoration: none;
}

/* Links follow the theme. (:where keeps these weak, so links styled elsewhere still win) */

/* Dark surfaces use the dark-mode link colours in both themes, so links stay readable on them */

.content-card, .timeline-details, .section {
  --link: #8ab4f8;
  --visited: #c58af9;
}

:where(a) {
  color: var(--link);
}

:where(a:visited) {
  color: var(--visited);
}

/* Dark mode switch (added by theme.js): sun · sliding switch · moon, pushed to the right */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  align-self: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  cursor: pointer;
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.theme-toggle svg:last-child {
  fill: currentColor;
  stroke: none;
}

.theme-toggle .track {
  position: relative;
  width: 34px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 9px;
  box-sizing: border-box;
}

.theme-toggle .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  transition: transform .15s;
}

.theme-toggle[aria-checked="true"] .knob {
  transform: translateX(16px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

/* Timeline Tests 1 and 2 (Research and Development page): the era bar runs down the
   middle with events on either side, and each event card stacks its picture above its text */

.timeline-core {
  color: var(--blackish);
}

.timeline-block {
  width: 100%;
  min-width: 0;
}

.events-holder {
  min-width: 0;
}

.timeline-blurb {
  flex-direction: column;
  align-items: stretch;
}

.timeline-blurb .image.thumbnail {
  order: -1;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.timeline-blurb .div-block-3 {
  width: auto;
  margin: 16px;
}

/* Narrow screens: same layout, with a slim bar whose label runs down it */

@media screen and (max-width: 767px) {
  .events-holder {
    flex: 1 1 0;
    width: auto;
  }

  .timeline-spacer {
    flex: 0 0 8px;
    width: 8px;
  }

  .timeline-core {
    flex: 0 0 36px;
    width: 36px;
  }

  .timeline-core .text-block {
    writing-mode: vertical-rl;
    padding: 12px 0;
  }

  .timeline-blurb .div-block-3 {
    margin: 10px;
  }

  .text-block-3 {
    padding: 0;
    font-size: 16px;
  }

  .event-title {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .event-blurb {
    font-size: 14px;
    line-height: 1.4;
  }
}

/* Timeline Test 3 (Research and Development): a spine down the middle with a dot for each
   date; that date's events hang off the dot on alternating sides, linked by a short line.
   Each era's name stays pinned to the top of the screen while you scroll through it. */

.t3, .t3-dates {
  margin: 0;
  padding: 0;
  list-style: none;
}

.t3 {
  --spine: #ffb700;
  --spine-width: 6px;
  --gutter: 56px;
  margin-bottom: 40px;
}

.t3-era {
  position: relative;
}

.t3-era:nth-child(even) {
  --spine: #fcd126;
}

.t3-era-name {
  position: sticky;
  top: 8px;
  z-index: 2;
  width: fit-content;
  margin: 0 auto;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--blackish);
  background-color: var(--spine);
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}

.t3-dates {
  padding: 24px 0;
  background: linear-gradient(var(--spine), var(--spine)) center / var(--spine-width) 100% no-repeat;
}

.t3-date {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--gutter) minmax(0, 1fr);
  align-items: start;
  margin-bottom: 24px;
}

.t3-dot {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border: 4px solid var(--spine);
  border-radius: 50%;
  background-color: var(--bg);
}

.t3-events {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 10px;
}

.t3-right .t3-events {
  grid-column: 3;
}

/* The line from the dot to its events */

.t3-events::before {
  content: "";
  position: absolute;
  top: 12px;
  right: calc(var(--gutter) / -2 + 9px);
  width: calc(var(--gutter) / 2 - 9px);
  border-top: 2px solid var(--spine);
}

.t3-right .t3-events::before {
  right: auto;
  left: calc(var(--gutter) / -2 + 9px);
}

.t3-when {
  justify-self: end;
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.t3-right .t3-when {
  justify-self: start;
}

.t3-event {
  overflow: hidden;
  border-radius: 6px;
  color: var(--snow);
  background-color: var(--blackish);
}

.t3-event img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.t3-event-text {
  padding: 10px 14px 12px;
}

.t3-what {
  margin: 0 0 4px;
  font-weight: bold;
  line-height: 1.35;
}

.t3-from {
  margin: 0;
  font-size: 14px;
  opacity: .75;
}

/* Phones: same layout with a narrower gap and smaller text, so both sides still fit */

@media screen and (max-width: 479px) {
  .t3 {
    --spine-width: 4px;
    --gutter: 32px;
  }

  .t3-dot {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border-width: 3px;
  }

  .t3-events::before {
    top: 10px;
    right: calc(var(--gutter) / -2 + 7px);
    width: calc(var(--gutter) / 2 - 7px);
  }

  .t3-right .t3-events::before {
    left: calc(var(--gutter) / -2 + 7px);
  }

  .t3-when {
    font-size: 15px;
  }

  .t3-event-text {
    padding: 8px 10px 10px;
  }

  .t3-what {
    font-size: 14px;
  }

  .t3-from {
    font-size: 12px;
  }
}

/* With timeline-test-3.js running, each date is placed by the script */

.t3-js .t3-dates {
  position: relative;
  box-sizing: content-box;
}

.t3-js .t3-date {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
}
