:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  background: #f4f1ea;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #f4f1ea;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

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

.upc-page {
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Space Grotesk", sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.upc-chrome {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(7px);
}

.upc-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 44px;
}

.upc-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.upc-brand svg {
  display: block;
  flex-shrink: 0;
}

.upc-brand span {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0;
}

.upc-clock {
  justify-self: center;
}

.upc-nav-links {
  display: flex;
  gap: 24px;
  align-items: baseline;
  justify-self: end;
  font-size: 14px;
}

.upc-nav-links a {
  position: relative;
  padding-bottom: 4px;
  color: var(--ink);
  text-decoration: none;
}

.upc-nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--tc-nav-line, var(--ink));
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease, opacity 160ms ease;
}

.upc-nav-links a:hover::after,
.upc-nav-links a:focus-visible::after,
.upc-nav-links a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.upc-nav-links a:focus-visible {
  border-radius: 3px;
  outline: 2px solid color-mix(in srgb, var(--tc-nav-focus, var(--ink)) 55%, transparent);
  outline-offset: 5px;
}

.upc-nav-links a[href="/projects/"] {
  --tc-nav-line: #14a2ae;
  --tc-nav-focus: #14a2ae;
}

.upc-nav-links a[href="/talks/"] {
  --tc-nav-line: #e24a3b;
  --tc-nav-focus: #e24a3b;
}

.upc-nav-links a[href="/writing/"] {
  --tc-nav-line: #2e8b6e;
  --tc-nav-focus: #2e8b6e;
}

.upc-nav-links a[href="/about/"] {
  --tc-nav-line: #a084d8;
  --tc-nav-focus: #a084d8;
}

.upc-breadcrumb-row {
  border-top: 1px solid var(--line);
}

.upc-breadcrumb-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 9px 44px;
  font-size: 13.5px;
}

.upc-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.upc-breadcrumb a {
  color: var(--soft);
  text-decoration: none;
}

.upc-breadcrumb-separator {
  color: var(--line);
}

.upc-breadcrumb-current {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upc-variant-switch {
  display: inline-flex;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.upc-variant-switch a {
  min-width: 38px;
  padding: 7px 9px;
  border-left: 1px solid var(--line);
  color: var(--soft);
  text-align: center;
  text-decoration: none;
}

.upc-variant-switch a:first-child {
  border-left: 0;
}

.upc-variant-switch a.is-active {
  color: var(--paper);
  background: var(--ink);
}

.upc-image-hero {
  position: relative;
  width: 100vw;
  height: clamp(440px, calc(100vh - 180px), 720px);
  min-height: 0;
  overflow: hidden;
  background: #3b2218;
}

.upc-image-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
}

.upc-image-hero__copy {
  position: absolute;
  top: 13%;
  left: 50%;
  width: min(1052px, calc(100% - 88px));
  transform: translateX(-50%);
  color: #fff;
  text-shadow: 0 1px 12px rgb(0 0 0 / 45%);
}

.upc-image-hero h1 {
  max-width: 10ch;
  margin: 0 0 17px;
  font-size: 62px;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.upc-image-hero p {
  max-width: 34ch;
  margin: 0;
  font-size: 20px;
  line-height: 1.48;
  text-wrap: pretty;
}

.upc-split-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 56px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 46px 44px;
}

.upc-split-header--feature {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  padding-top: 48px;
  padding-bottom: 48px;
}

.upc-split-header--image-below {
  grid-template-columns: minmax(0, 1fr);
}

.upc-split-header__copy {
  min-width: 0;
}

.upc-split-header h1 {
  margin: 0 0 16px;
  font-size: 46px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.upc-split-header--feature h1 {
  font-size: 50px;
  line-height: 1.06;
}

.upc-split-header p {
  max-width: 44ch;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.5;
  text-wrap: pretty;
}

.upc-split-header--feature p {
  font-size: 20px;
  line-height: 1.48;
}

.upc-split-header figure {
  justify-self: end;
  width: min(300px, 100%);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper2);
  aspect-ratio: 4 / 3;
}

.upc-split-header--feature figure {
  width: min(420px, 100%);
}

.upc-split-header img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upc-header-rule {
  border-top: 1px solid var(--line);
}

.upc-header-image-full {
  width: 100vw;
  margin: 0;
  background: var(--paper2);
}

.upc-header-image-full img {
  display: block;
  width: 100%;
  height: auto;
}

.upc-reading-layout {
  max-width: 100%;
  margin: 0 auto;
}

.upc-main {
  min-width: 0;
}

.upc-sidebar {
  display: none;
}

.upc-article {
  max-width: 690px;
  margin: 0 auto;
  padding: 46px 44px 90px;
  color: #1f2b33;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 20px;
  font-kerning: normal;
  line-height: 1.58;
}

.upc-section {
  margin: 0 0 42px;
}

.upc-section:last-child {
  margin-bottom: 0;
}

.upc-section + .upc-section {
  padding-top: 18px;
}

.upc-article p {
  margin: 0 0 23px;
  text-wrap: pretty;
}

.upc-article p:last-child {
  margin-bottom: 0;
}

.upc-article .upc-preamble {
  margin-bottom: 38px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.55;
}

.upc-article a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 58%, transparent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.upc-article a:hover {
  text-decoration-color: currentColor;
}

.upc-media {
  --upc-content-width: min(1052px, calc(100vw - 88px));
  width: 100%;
  max-width: calc(100vw - 48px);
  margin: 46px 0 38px 50%;
  transform: translateX(-50%);
}

.upc-media--content {
  width: var(--upc-content-width);
  max-width: var(--upc-content-width);
}

.upc-media--full {
  width: 100vw;
  max-width: 100vw;
}

.upc-media--text {
  width: 100%;
}

.upc-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper2);
}

.upc-media--full img {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.upc-media figcaption {
  max-width: 690px;
  margin: 10px auto 0;
  padding: 0 22px;
  color: var(--soft);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  line-height: 1.42;
  text-align: center;
  text-wrap: pretty;
}

.upc-media--logo {
  width: 106px;
  margin-top: 52px;
}

.upc-media--logo img {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.upc-coffee-figure {
  width: var(--upc-content-width);
  max-width: var(--upc-content-width);
  scroll-margin-top: 128px;
}

.upc-coffee-figure > figcaption {
  margin-top: 14px;
}

up-coffee-flask-demo {
  display: block;
  width: 100%;
}

.upc-coffee-fallback {
  width: min(388px, 100%);
  margin: 0 auto;
}

.upc-coffee-demo__stage {
  position: relative;
  display: grid;
  width: 100%;
  height: clamp(360px, 105vw, 760px);
  place-items: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper2);
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.upc-coffee-demo__stage::before,
.upc-coffee-demo__stage::after {
  position: absolute;
  z-index: 0;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  content: "";
  pointer-events: none;
}

.upc-coffee-demo__stage::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.upc-coffee-demo__stage::after {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.upc-coffee-demo__rotator {
  --upc-phone-angle: 0deg;
  position: relative;
  top: -13px;
  z-index: 1;
  width: clamp(128px, 40vw, 320px);
  aspect-ratio: 388 / 805;
  container-type: inline-size;
  transform: rotate(var(--upc-phone-angle));
  transform-origin: 50% 50%;
  transition: transform 90ms linear;
  will-change: transform;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.upc-coffee-demo__rotator.is-dragging {
  transition: none;
}

.upc-coffee-demo__phone {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid #171c21;
  border-radius: 11% / 5.5%;
  background: #050607;
  box-shadow: 0 22px 25px rgb(20 32 42 / 22%);
}

.upc-coffee-demo__phone-screen {
  position: absolute;
  z-index: 1;
  top: 14.66%;
  left: 9.28%;
  width: 82.48%;
  height: 70.68%;
  overflow: hidden;
  background: #fff;
}

.upc-media .upc-coffee-demo__phone-image {
  position: absolute;
  top: -20.74%;
  left: -11.25%;
  display: block;
  width: 121.25%;
  max-width: none;
  height: auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.upc-coffee-demo__speaker,
.upc-coffee-demo__camera,
.upc-coffee-demo__home {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
}

.upc-coffee-demo__speaker {
  top: 8.45%;
  left: 41.75%;
  width: 17.5%;
  height: 1.75%;
  border: 1px solid #282d31;
  border-radius: 999px;
  background: #111418;
}

.upc-coffee-demo__camera {
  top: 5.3%;
  left: 50%;
  width: 2.6%;
  aspect-ratio: 1;
  border: 1px solid #222a31;
  border-radius: 50%;
  background: #10161c;
  transform: translateX(-50%);
}

.upc-coffee-demo__home {
  bottom: 3.75%;
  left: 50%;
  width: 17.25%;
  aspect-ratio: 1;
  border: 1px solid #282d31;
  border-radius: 50%;
  background: #07090b;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 3%) inset;
  transform: translateX(-50%);
}

.upc-coffee-demo__home::after {
  position: absolute;
  inset: 35%;
  border: 1px solid #525a60;
  border-radius: 2px;
  content: "";
}

.upc-coffee-demo__canvas {
  position: absolute;
  z-index: 2;
  top: 25.72%;
  left: 9.28%;
  display: block;
  width: 82.48%;
  height: 47.7%;
}

.upc-coffee-demo__hint {
  position: absolute;
  z-index: 4;
  top: 18.5%;
  left: calc(100% + 0.9em);
  box-sizing: border-box;
  width: calc(6.5cqw + clamp(100px, 16vw, 160px) + 0.9em);
  padding-left: calc(6.5cqw + 0.9em);
  color: rgb(90 61 40 / 82%);
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(12px, 1.9vw, 18px);
  font-weight: 600;
  line-height: 1.08;
  text-align: left;
  transform: rotate(2deg);
  transform-origin: left bottom;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear;
  pointer-events: none;
  opacity: 0.85;
}

.upc-coffee-demo__hint::before {
  position: absolute;
  top: 50%;
  left: 0.25em;
  width: calc(6.5cqw - 0.25em);
  border-top: 1.5px solid rgb(90 61 40 / 80%);
  content: "";
  transform: rotate(-1deg);
  transform-origin: left center;
}

.upc-coffee-demo__hint::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.52em;
  height: 0.52em;
  border-bottom: 1.5px solid rgb(90 61 40 / 80%);
  border-left: 1.5px solid rgb(90 61 40 / 80%);
  color: rgb(90 61 40 / 80%);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.upc-coffee-demo__hint.is-dismissed {
  visibility: hidden;
  opacity: 0;
  transform: rotate(2deg) translateY(-3px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.upc-coffee-demo__add {
  position: absolute;
  z-index: 4;
  top: 21.25%;
  left: 82.7%;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.upc-coffee-demo__add:hover {
  background: transparent;
}

.upc-coffee-demo__add::after {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  content: "";
}

.upc-coffee-demo__add:hover::after {
  background: rgb(53 168 211 / 10%);
}

.upc-coffee-demo__add:focus-visible {
  outline: none;
}

.upc-coffee-demo__add:focus-visible::after {
  outline: 2px solid #167fa4;
  outline-offset: 2px;
}

.upc-coffee-demo__add:disabled {
  cursor: default;
}

.upc-coffee-demo__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upc-coffee-demo__handle {
  position: absolute;
  bottom: -38px;
  left: 50%;
  display: grid;
  width: 78px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  color: #fff;
  appearance: none;
  background: #111820;
  box-shadow: 0 8px 18px rgb(20 32 42 / 25%);
  cursor: grab;
  transform: translateX(-50%);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.upc-coffee-demo__handle span,
.upc-coffee-demo__handle span::before,
.upc-coffee-demo__handle span::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.upc-coffee-demo__handle span {
  position: relative;
}

.upc-coffee-demo__handle span::before,
.upc-coffee-demo__handle span::after {
  position: absolute;
  top: 0;
  content: "";
}

.upc-coffee-demo__handle span::before {
  left: -10px;
}

.upc-coffee-demo__handle span::after {
  right: -10px;
}

.upc-coffee-demo__handle:hover {
  background: #26333d;
}

.upc-coffee-demo__handle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.upc-coffee-demo__handle.is-dragging {
  cursor: grabbing;
}

.upc-reading-layout--sidebar {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  max-width: 1140px;
  padding: 34px 44px 90px;
}

.upc-reading-layout--sidebar .upc-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 30px;
}

.upc-sidebar-section {
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 50%, var(--line));
}

.upc-sidebar-kicker {
  margin: 0 0 12px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upc-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.upc-fact {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.35;
}

.upc-fact dt {
  color: var(--soft);
}

.upc-fact dd {
  margin: 0;
}

.upc-sidebar a {
  color: var(--ink);
  font-size: 14px;
  text-underline-offset: 3px;
}

.upc-reading-layout--sidebar .upc-article {
  max-width: none;
  margin: 0;
  padding: 30px 0 0;
  color: #232f38;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.upc-reading-layout--sidebar .upc-preamble {
  font-size: 15.5px;
}

.upc-reading-layout--sidebar .upc-media,
.upc-reading-layout--sidebar .upc-media--content,
.upc-reading-layout--sidebar .upc-media--full,
.upc-reading-layout--sidebar .upc-media--text {
  width: 100%;
  max-width: 100%;
  margin: 34px 0 30px;
  transform: none;
}

.upc-reading-layout--sidebar .upc-media img {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upc-reading-layout--sidebar .upc-media figcaption {
  max-width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.upc-reading-layout--sidebar .upc-media--logo {
  width: 106px;
  margin-right: auto;
  margin-left: auto;
}

.upc-reading-layout--sidebar .upc-media--logo img {
  border: 0;
  border-radius: 0;
}

.upc-footer {
  border-top: 1px solid var(--line);
}

.upc-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 44px;
}

.upc-footer-identity {
  display: flex;
  gap: 16px;
  align-items: center;
}

.upc-footer-dots {
  display: flex;
  gap: 6px;
}

.upc-footer-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.upc-footer-dots span:nth-child(1) {
  background: #14a2ae;
}

.upc-footer-dots span:nth-child(2) {
  background: #e1a81e;
}

.upc-footer-dots span:nth-child(3) {
  background: #e24a3b;
}

.upc-footer small,
.upc-footer a {
  color: var(--soft);
  font-size: 12.5px;
}

.upc-footer a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .upc-coffee-demo__rotator {
    width: 36vw;
  }

  .upc-nav {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .upc-brand,
  .upc-clock,
  .upc-nav-links {
    justify-self: start;
  }

  .upc-nav-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .upc-breadcrumb-inner {
    padding-right: 22px;
    padding-left: 22px;
  }

  .upc-image-hero {
    height: clamp(400px, calc(100vh - 210px), 620px);
  }

  .upc-image-hero__copy {
    top: 10%;
    width: calc(100% - 44px);
  }

  .upc-image-hero h1 {
    max-width: 9ch;
    font-size: 42px;
  }

  .upc-image-hero p {
    max-width: 28ch;
    font-size: 17px;
  }

  .upc-split-header,
  .upc-split-header--feature {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px 22px;
  }

  .upc-split-header h1,
  .upc-split-header--feature h1 {
    font-size: 40px;
  }

  .upc-split-header--feature p {
    font-size: 18px;
  }

  .upc-split-header figure,
  .upc-split-header--feature figure {
    justify-self: stretch;
    width: 100%;
  }

  .upc-article {
    padding-right: 22px;
    padding-left: 22px;
    font-size: 18px;
    line-height: 1.58;
  }

  .upc-media {
    --upc-content-width: min(1052px, calc(100vw - 44px));
  }

  .upc-reading-layout--sidebar {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 22px 72px;
  }

  .upc-reading-layout--sidebar .upc-sidebar {
    position: static;
    top: auto;
    padding-top: 0;
  }

  .upc-reading-layout--sidebar .upc-article {
    padding-top: 0;
    font-size: 17px;
    line-height: 1.65;
  }

  .upc-coffee-figure,
  .upc-reading-layout--sidebar .upc-coffee-figure {
    width: calc(100vw - 44px);
    max-width: calc(100vw - 44px);
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .upc-footer-inner {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 820px) {
  .upc-coffee-demo__rotator {
    top: 0;
  }
}

@media (max-width: 520px) {
  .upc-coffee-demo__rotator {
    width: 33vw;
  }

  .upc-coffee-demo__handle {
    width: 60px;
  }

  .upc-breadcrumb-current {
    max-width: 145px;
  }

  .upc-variant-switch a {
    min-width: 32px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .upc-image-hero {
    height: 480px;
  }

  .upc-image-hero img {
    object-position: 42% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .upc-nav-links a::after {
    transition: none;
  }

  .upc-coffee-demo__rotator {
    transition: none;
  }

  .upc-coffee-demo__hint,
  .upc-coffee-demo__hint.is-dismissed {
    transition: none;
  }

}
