:root {
  --fg: #111;
  --muted: rgba(0, 0, 0, 0.4);
  --bg: #fff;
  --rule: #f2f2f2;
  --link: #111;
  --card-bg: #f6f6f6;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 460;
  line-height: 1.35rem;
  letter-spacing: -0.00563rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv01", "ss03";
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 1.5px;
}

main {
  max-width: 692px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}

header {
  margin-bottom: 48px;
}

h1 {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35rem;
  letter-spacing: -0.00563rem;
  margin: 0 0 2px;
}

h2 {
  font-size: 0.9375rem;
  font-weight: 560;
  line-height: 1.35rem;
  letter-spacing: -0.00563rem;
  margin: 0 0 16px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

p {
  margin: 0 0 16px;
}

section + section {
  margin-top: 56px;
}

figure {
  margin: 32px 0;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.15rem;
  letter-spacing: 0.00063rem;
  margin-top: 10px;
}

.meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 460;
  letter-spacing: 0.00063rem;
  line-height: 1.2;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

nav.back {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: 0.875rem;
  letter-spacing: -0.0025rem;
  z-index: 10;
}

nav.back a {
  color: var(--muted);
  text-decoration: none;
}

nav.back a:hover {
  color: var(--fg);
}

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

.list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.list li:last-child {
  border-bottom: none;
}

.list .label {
  color: var(--muted);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 20px;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  text-decoration: none;
}

.card-image {
  aspect-ratio: 4 / 3;
  background: var(--card-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  transition: opacity 0.15s ease;
}

.card:hover .card-image {
  opacity: 0.85;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.card-title .name {
  color: var(--fg);
}

.card-title .year {
  color: var(--muted);
}

@media (max-width: 560px) {
  .projects {
    grid-template-columns: 1fr;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.gallery.single {
  grid-template-columns: 1fr;
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* Pinterest-style masonry gallery, laid out by masonry.js
   into .masonry-row blocks, each containing .masonry-col flex columns.
   Wide items sit between rows. */
.masonry {
  display: block;
  margin: 0;
}

.masonry-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
}

.masonry-row:last-child {
  margin-bottom: 0;
}

.masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.masonry img,
.masonry video,
.masonry-col > * {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--card-bg);
}

/* full-width breakers, sit between rows */
.masonry-wide {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--card-bg);
}

.masonry > .masonry-wide {
  margin: 0 0 12px;
}

@media (max-width: 560px) {
  .masonry-row {
    flex-direction: column;
    align-items: stretch;
  }
  .masonry-col {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* let the page itself be wider on detail pages so the gallery breathes */
.detail main {
  max-width: 880px;
}

/* custom tweet cards */
.tweet-cards {
  column-count: 2;
  column-gap: 12px;
}

@media (max-width: 560px) {
  .tweet-cards {
    column-count: 1;
  }
}

.tweet-card {
  display: block;
  break-inside: avoid;
  margin: 0 0 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: opacity 0.15s ease;
}

.tweet-card:hover {
  text-decoration: none;
  opacity: 0.85;
}

.tweet-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 6px;
}

.tweet-card-pfp {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--card-bg);
}

.tweet-card-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.tweet-card-name {
  color: var(--fg);
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tweet-card-handle {
  color: var(--muted);
  font-size: 0.8125rem;
}

.tweet-card-body {
  padding: 4px 14px 12px;
  font-size: 0.875rem;
  line-height: 1.35rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.tweet-card-body .mention {
  color: var(--muted);
}

.tweet-card-img {
  width: 100%;
  height: auto;
  display: block;
}

.tweet-card-video {
  position: relative;
}

.tweet-card-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent, rgba(0, 0, 0, 0.0)) no-repeat,
    radial-gradient(circle at center, rgba(0, 0, 0, 0.55) 26px, transparent 27px);
  pointer-events: none;
}

.tweet-card-video::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateX(2px);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
  z-index: 1;
}

@media (max-width: 560px) {
  main {
    padding: 88px 20px 64px;
  }

  header {
    margin-bottom: 32px;
  }

  section + section {
    margin-top: 40px;
  }

  figure {
    margin: 24px 0;
  }

  nav.back {
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--bg);
  }

  main {
    padding-top: 72px;
  }

  .meta {
    flex-direction: column;
    gap: 4px;
    margin-top: 56px;
  }

  .projects {
    gap: 24px 16px;
  }

  .list li {
    padding: 12px 0;
  }
}

@media (max-width: 380px) {
  nav.back a {
    max-width: 160px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
}
