/* One narrow column, one typeface, text rows. Designs and boards each fan
   out wider than the column. */
:root {
  --bg: #fcfcfb;
  --fg: #171717;
  --muted: #6f6f6f;
  --faint: #a1a1a1;
  --line: rgba(0, 0, 0, 0.14);
  --hover: rgba(0, 0, 0, 0.035);
  --tile: #efefed;
  --ring: rgba(0, 0, 0, 0.06);
  --lifted: 0 2px 4px rgba(0, 0, 0, 0.05), 0 16px 32px -14px rgba(0, 0, 0, 0.3);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --fg: #ededed;
    --muted: #a0a0a0;
    --faint: #6e6e6e;
    --line: rgba(255, 255, 255, 0.18);
    --hover: rgba(255, 255, 255, 0.045);
    --tile: #1c1c1c;
    --ring: rgba(255, 255, 255, 0.07);
    --lifted: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 32px -14px rgba(0, 0, 0, 0.85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212;
  --fg: #ededed;
  --muted: #a0a0a0;
  --faint: #6e6e6e;
  --line: rgba(255, 255, 255, 0.18);
  --hover: rgba(255, 255, 255, 0.045);
  --tile: #1c1c1c;
  --ring: rgba(255, 255, 255, 0.07);
  --lifted: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 32px -14px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover {
  text-decoration-color: var(--fg);
}
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 8px;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding-block: clamp(56px, 14vh, 128px) 96px;
}

/* name and local time */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.clock {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bio {
  margin-top: 28px;
  color: var(--muted);
}
.bio p {
  margin: 0 0 14px;
  text-wrap: pretty;
}
.bio p:last-child {
  margin-bottom: 0;
}
.bio .hi {
  color: var(--fg);
}
.social {
  white-space: nowrap;
}
.glyph {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.32em;
  vertical-align: -0.1em;
  fill: currentColor;
}

/* ---------- designs, fanned out wider than the column ---------- */
.showcase {
  margin-top: 64px;
}
.deck {
  --scale: 1;
  --step: 118px;
  --spread: 36px;
  position: relative;
  left: 50%;
  width: min(780px, calc(100vw - 32px));
  height: calc(210px * var(--scale));
  transform: translateX(-50%);
  cursor: pointer;
  touch-action: manipulation;
}
/* the deck decides which card the pointer means, so cards ignore the pointer */
.card {
  --d: 0;
  --push: 0;
  --y: 0px;
  --r: 0deg;
  --s: 1;
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tile);
  box-shadow: 0 0 0 1px var(--ring), var(--lifted);
  transform: translate(-50%, -50%) scale(var(--scale)) translate(calc(var(--d) * var(--step) + var(--push) * var(--spread)), var(--y)) rotate(var(--r)) scale(var(--s));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  font: inherit;
  color: inherit;
}
/* no animation until the fan has been laid out once */
.deck:not(.ready) .card {
  transition: none;
}
.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.caption {
  min-height: 1.6em;
  margin: 14px 0 0;
  text-align: center;
  color: var(--faint);
}
.caption b {
  font-weight: 500;
  color: var(--fg);
}
.caption span {
  color: var(--muted);
}

/* ---------- lists ---------- */
.block {
  margin-top: 56px;
}
h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 500;
}
.row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  margin: 0 -10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
a.row:hover {
  background: var(--hover);
}
.name {
  font-weight: 500;
}
.desc {
  color: var(--muted);
  min-width: 0;
}
.year {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* full image for designs that have no site to open */
.viewer {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1200px, 92vw);
  overflow: visible;
}
.viewer::backdrop {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.viewer img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--lifted);
  cursor: zoom-out;
}

@media (max-width: 560px) {
  .bio {
    margin-top: 24px;
  }
  .showcase {
    margin-top: 48px;
  }
  .deck {
    --step: 76px;
    --spread: 14px;
  }
  .block {
    margin-top: 48px;
  }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
  }
  .row .desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
