@font-face {
  font-family: "Valty DEMO";
  src: url("../fonts/Valty-DEMO.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Carter One";
  src: url("../fonts/CarterOne-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #eeeeee;
  --ink: #202020;
  --muted: #575757;
  --line: #b7b7b7;
  --panel: #272727;
  --accent: #e4e4e4;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 2px solid #5b5b5b; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
p { line-height: 1.55; }
.wrap { width: min(100% - 80px, 1440px); margin-inline: auto; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 2; padding: .75rem; background: var(--accent); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header a, .site-footer a { text-decoration: none; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.brand, nav, .eyebrow, figcaption, .section-heading p, .site-footer, .stage-index {
  font: 600 .75rem/1.4 var(--mono);
  letter-spacing: .035em;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; color: var(--accent); background: var(--ink); font-size: 1.25rem; }
nav { display: flex; flex-wrap: wrap; gap: .65rem clamp(.8rem, 3vw, 2.5rem); }
.home-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 5rem clamp(1rem, 4vw, 4rem);
  background: linear-gradient(#151515a6, #15151533 30%, #15151547), url("../images/escher-treppenhaus.jpg") center / cover;
  background-color: var(--panel);
}
.home-nav, .listing-header {
  padding-inline: clamp(1rem, 4vw, 4rem);
}
.home-nav {
  position: absolute;
  inset: clamp(1rem, 3vw, 2.5rem) 0 auto;
}
.home-nav, .listing-nav {
  justify-content: flex-end;
  gap: clamp(.25rem, 2vw, 1.5rem);
}
.listing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: clamp(1rem, 3vw, 2.5rem);
}
.home-nav a, .listing-nav a, .home-icon {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: .5rem;
  font-size: .875rem;
  text-decoration: none;
}
.home-icon { min-width: 44px; }
.home-nav a {
  color: white;
  text-shadow: 0 1px 4px #000, 0 0 10px #000;
}
.home-nav a:hover, .home-nav a:focus-visible,
.listing-nav a:hover, .listing-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .3em;
}
.home-nav a:hover, .home-nav a:focus-visible { color: var(--accent); }
.home-nav a:focus-visible { outline-color: var(--accent); }
.home-hero h1 {
  color: white;
  font: 400 clamp(1.65rem, 10.5vw, 10rem)/1.1 "Carter One", Georgia, serif;
  font-family: "Valty DEMO", "Carter One", Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-synthesis: none;
  letter-spacing: -.035em;
  text-shadow: 0 .025em .22em #0b0b0b, 0 .015em .035em #0b0b0b;
}
.wordmark-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  cursor: pointer;
}
.wordmark-trigger:focus-visible { outline-color: white; }
.easter-egg {
  max-width: calc(100% - 2rem);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 700 1.25rem Georgia, serif;
  text-align: center;
}
.easter-egg::backdrop { background: #0006; }
.easter-egg button {
  margin-top: .75rem;
  padding: .4rem .75rem;
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  cursor: pointer;
}
.eyebrow { text-transform: uppercase; color: var(--muted); }
.diagram { position: relative; overflow: hidden; background-color: var(--panel); background-image: linear-gradient(#e7e7e712 1px, transparent 1px), linear-gradient(90deg, #e7e7e712 1px, transparent 1px); background-size: 24px 24px; color: #dedede; }
.diagram canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.diagram figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; position: absolute; inset: auto 1rem .9rem; border-top: 1px solid #dedede66; padding-top: .55rem; }
.about-details { display: grid; grid-template-columns: 1.5fr 1fr; column-gap: clamp(1.5rem, 5vw, 5rem); }
.section { padding-block: clamp(2rem, 4vw, 4.5rem); border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.section h1, .section h2, .project-intro h1 { font: 800 clamp(2.2rem, 5vw, 5.25rem)/.98 var(--display); letter-spacing: -.065em; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.4rem; }
.section-heading p { color: var(--muted); text-transform: uppercase; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.project-card a { display: block; text-decoration: none; }
.project-card .diagram { aspect-ratio: 1.85; }
.project-card:nth-child(2) .diagram { background-color: #373737; }
.card-copy { display: flex; justify-content: space-between; gap: 1rem; margin-top: .85rem; }
.card-copy h3 { font-size: clamp(1.3rem, 2.5vw, 2.2rem); letter-spacing: -.045em; }
.card-copy span { font-size: 1.5rem; }
.project-card a:hover h3 { text-decoration: underline; text-underline-offset: .15em; }
.project-card p, #about p, .contact p, .project-intro p, .stage p { color: var(--muted); }
#about p, .contact p { margin-top: 1rem; max-width: 55ch; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.project-intro { padding-block: clamp(2rem, 5vw, 5rem) 1.4rem; }
.project-intro h1 { margin-block: .75rem; }
.project-intro p { max-width: 65ch; }
.project-diagram { min-height: 19rem; height: min(50vw, 32rem); margin-bottom: 1.25rem; }
.stage { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr; gap: 1rem 2rem; }
.stage h2 { font-size: clamp(1.65rem, 3vw, 3rem); }
.stage-index { display: block; color: var(--muted); margin-bottom: .65rem; }
.stage p { max-width: 66ch; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: .85rem; }
  nav a { padding-block: .3rem; }
  .about-details, .project-grid, .stage { grid-template-columns: 1fr; }
  .project-grid { gap: 1.75rem; }
  .project-card .diagram { aspect-ratio: 1.5; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.sketch-page {
  min-height: 100vh;
  --paper: #f5f5f5;
  --ink: #2f2f2f;
  --muted: #575757;
  --line: #9c9c9c;
  background-image:
    radial-gradient(ellipse at 85% 0%, #92929226, transparent 55%),
    repeating-linear-gradient(113deg, #56565607 0 1px, transparent 1px 5px);
  font-family: Georgia, "Times New Roman", serif;
}
.sketch-page .brand {
  font: 400 1.3rem/1.2 "Carter One", Georgia, serif;
  letter-spacing: -.035em;
}
.sketch-page .brand-mark {
  background: transparent;
  color: var(--muted);
}
.sketch-page .section h1,
.sketch-page .section h2,
.sketch-page .project-intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  letter-spacing: -.055em;
}
.sketch-page .card-copy h3 { font-style: italic; }
.sketch-page .project-intro p,
.sketch-page .stage p,
.sketch-page .project-card p { font-size: 1.08rem; }
.sketch-page .stage-index { font-weight: 400; }
.sketch-page .diagram,
.sketch-page .project-card:nth-child(2) .diagram {
  border: 1px solid var(--line);
  background-color: #ededed;
  background-image:
    linear-gradient(#76767617 1px, transparent 1px),
    linear-gradient(90deg, #76767617 1px, transparent 1px),
    radial-gradient(ellipse, transparent 35%, #8c8c8c26);
  background-size: 20px 20px, 20px 20px, auto;
  color: var(--muted);
}
.sketch-page .diagram figcaption { border-color: var(--line); }

.gadget-grid {
  display: grid;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 3vw, 2rem);
}
.gadget-link {
  display: grid;
  justify-items: center;
  padding: .35rem .5rem .65rem;
  font: italic 700 .75rem Georgia, serif;
  text-align: center;
  text-decoration: none;
}
.gadget-link img {
  display: block;
  width: min(100%, 14rem);
  aspect-ratio: 1121 / 1403;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.gadget-link:hover span { text-decoration: underline; text-underline-offset: .15em; }
@media (max-width: 560px) {
  .gadget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fixie-page {
  min-height: 100vh;
  background-color: #e8e8e8;
  background-image: radial-gradient(#bdbdbd 1px, transparent 1px);
  background-size: 5px 5px;
  font-family: Verdana, Arial, sans-serif;
}
.fixie-wheel {
  position: relative;
  width: min(42vw, 11rem);
  aspect-ratio: 1;
  margin: .2rem auto 1.5rem;
  border: .45rem solid #242424;
  border-radius: 50%;
  background:
    radial-gradient(circle, #dedede 0 4%, #333 4.5% 7%, transparent 7.5%),
    repeating-conic-gradient(from 2deg, #777 0 .8deg, #f4f4f4 .8deg 11.25deg);
  box-shadow: inset 0 0 0 2px #f4f4f4, inset 0 0 0 4px #5c5c5c, 0 0 0 1px #777;
}
.fixie-wheel::after {
  content: "";
  position: absolute;
  inset: 5%;
  border: 1px solid #999;
  border-radius: 50%;
}
.fixie-panel {
  width: min(100%, 25rem);
  margin: 0 auto 2.5rem;
  padding: 2px;
  border: 2px outset #efefef;
  background: #d6d6d6;
  box-shadow: 3px 3px #0002;
}
.fixie-panel h1 {
  padding: .45rem .65rem;
  background: linear-gradient(#555, #262626);
  color: white;
  font-size: .875rem;
}
.fixie-calculator {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  font-size: .875rem;
}
.fixie-calculator label {
  display: grid;
  grid-template-columns: 1fr minmax(4rem, 7rem);
  align-items: center;
  gap: .65rem;
}
.fixie-calculator input, .fixie-calculator button {
  min-width: 0;
  padding: .45rem .55rem;
  color: var(--ink);
  font: inherit;
}
.fixie-calculator input { border: 2px inset #e5e5e5; background: #fff; }
.fixie-calculator button {
  justify-self: start;
  border: 2px outset #efefef;
  background: linear-gradient(#f7f7f7, #c2c2c2);
  cursor: pointer;
}
.fixie-calculator button:active { border-style: inset; }

.fixie-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: .65rem .25rem;
  border: 2px inset #e5e5e5;
  background: #f7f7f7;
  text-align: center;
  font: .78rem/1.4 var(--mono);
}
.fixie-results > div + div { border-left: 1px solid #ccc; }
.fixie-results strong {
  display: block;
  font-size: clamp(1.3rem, 5vw, 1.85rem);
  overflow-wrap: anywhere;
}
.fixie-reference { width: min(100%, 62rem); margin: 0 auto; padding-bottom: 3rem; }
.fixie-reference h2 { margin-bottom: .45rem; font-size: 1.1rem; }
.fixie-reference img { display: block; width: 100%; height: auto; }

.project-grid.project-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-list-link {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.project-list-link .card-copy { margin-top: 0; align-items: baseline; }
.sketch-page .project-list-link h2 { font-size: clamp(1.5rem, 3vw, 2.6rem); }
.project-list-link:hover h2 { text-decoration: underline; text-underline-offset: .15em; }

.project-list-image {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  margin-bottom: .75rem;
  background-image:
    linear-gradient(#8882 1px, transparent 1px),
    linear-gradient(90deg, #8882 1px, transparent 1px);
  background-size: 20px 20px;
}
.project-list-image img {
  display: block;
  width: 90%;
  height: 90%;
  min-height: 0;
  object-fit: contain;
}
