html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #111 url("bg.jpg") center / cover no-repeat;
  color: #f3f3f3;
  font-family: "Nunito Sans", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(90,110,150,.55) 0%, rgba(36,52,88,.72) 100%);
  mix-blend-mode: soft-light;
}
.brand {
  position: fixed;
  z-index: 2;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  color: #f3f3f3;
  text-decoration: none;
  font: 300 18px/1 "Nunito Sans", sans-serif;
}
.brand img { width: 36px; height: 36px; display: block; }
.side {
  position: absolute;
  z-index: 1;
  left: 40px;
  top: 96px;
  width: calc(25% - 40px);
  max-width: 300px;
}
.side h1 {
  margin: 0 0 18px;
  color: #f3f3f3;
  font: 900 clamp(42px, 4vw, 64px)/0.9 "Nunito Sans", sans-serif;
  letter-spacing: -0.02em;
}
.side .blurb {
  margin: 0 0 28px;
  color: rgba(243,243,243,.88);
  font: 300 15px/1.5 "Nunito Sans", sans-serif;
}
.menu {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid rgba(243,243,243,.28);
  font: 300 20px/1 "Nunito Sans", sans-serif;
}
.menu li + li { margin-top: .18rem; }
.menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: .66rem 0 .66rem 1.2rem;
  color: #f3f3f3;
  text-decoration: none;
  letter-spacing: .04em;
}
.menu a::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(243,243,243,.45);
}
.menu .idx {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .14em;
  color: rgba(243,243,243,.48);
}
.menu a:hover .idx, .menu a[aria-current] .idx { color: #f3f3f3; }
.menu a:hover::before, .menu a[aria-current]::before { width: 19px; background: #f3f3f3; }
.work {
  position: absolute;
  z-index: 1;
  left: 25%;
  right: 40px;
  top: 96px;
  bottom: 28px;
  padding-left: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}
.work::-webkit-scrollbar { display: none; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 0 4px 28px 0;
}
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #15171c;
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
a.card:hover { background: #1e222a; }
.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #111;
  overflow: hidden;
}
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 16px 22px 22px;
}
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(243,243,243,.45);
  border-radius: 999px;
  background: none;
  color: #f3f3f3;
  font: 400 11px/1 "Nunito Sans", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.card-meta .pill {
  padding: 4px 8px;
  font: 400 9px/1 "Nunito Sans", sans-serif;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.card h2 {
  margin: 0;
  color: #f3f3f3;
  font: 600 22px/1.25 "Nunito Sans", sans-serif;
  letter-spacing: -0.02em;
}
.excerpt {
  margin: 0;
  color: rgba(243,243,243,.88);
  font: 300 15px/1.5 "Nunito Sans", sans-serif;
  letter-spacing: 0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.when {
  margin: auto 0 0;
  padding-top: 6px;
  color: #7d7d7d;
  font: 400 12px/1.35 "Nunito Sans", sans-serif;
  letter-spacing: 0.14em;
}
.empty {
  margin: 0;
  color: rgba(243,243,243,.88);
  font: 300 15px/1.5 "Nunito Sans", sans-serif;
}
.screen.cards { overflow: hidden; }
@media (max-width: 800px) {
  html, body { height: 100%; overflow: hidden; }
  .screen.cards { display: flex; flex-direction: column; overflow: hidden; }
  .side, .work {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    scrollbar-width: none;
  }
  .side::-webkit-scrollbar, .work::-webkit-scrollbar { display: none; }
  .side {
    flex: 0 0 auto;
    overflow: visible;
    padding: 96px 24px 0;
  }
  .work {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px 28px;
  }
  .grid { grid-template-columns: 1fr; }
}
:is(#sandbox, #portfolio) .work {
  overflow: hidden;
  padding: 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
:is(#sandbox, #portfolio) .work::-webkit-scrollbar { display: none; }
:is(#sandbox, #portfolio) .stack { position: relative; }
:is(#sandbox, #portfolio) .feed-cards,
:is(#sandbox, #portfolio) .sheet {
  height: var(--pane);
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}
:is(#sandbox, #portfolio) .feed-cards {
  padding: 0 4px 28px 20px;
  overflow: hidden;
}
:is(#sandbox, #portfolio) .sheet {
  overflow-y: auto;
}
:is(#sandbox, #portfolio) .feed-cards::-webkit-scrollbar,
:is(#sandbox, #portfolio) .sheet::-webkit-scrollbar { display: none; }
:is(#sandbox, #portfolio) .sheet { padding: 0 4px 36px 20px; }
.sheet-back { margin: 0 0 18px; }
.sheet-back a {
  display: inline-flex;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: #efa12f;
  color: #15171c;
  font: 400 11px/1 "Nunito Sans", sans-serif;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.sheet-back a:hover { opacity: .65; }
.piece { max-width: none; padding: 0 0 36px; }
.piece-meta, .piece h2, .piece h3, .piece p, .piece .see { max-width: 40rem; }
.piece-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
  color: #7d7d7d;
  font: 400 12px/1.35 "Nunito Sans", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.piece-meta .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.piece h2 {
  margin: 0 0 22px;
  color: #f3f3f3;
  font: 600 32px/1.25 "Nunito Sans", sans-serif;
  letter-spacing: -0.02em;
}
.piece-photos { display: flex; gap: 24px; margin: 0 0 28px; }
.piece-photos img {
  flex: 1 1 0;
  width: 0;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
}
.piece-video {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 28px;
  background: #111;
  border-radius: 8px;
}
.piece p a { color: #f3f3f3; }
.piece iframe,
.piece video {
  max-width: 850px;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  display: block;
}
.piece h3 {
  margin: 22px 0 8px;
  color: #7d7d7d;
  font: 400 12px/1.35 "Nunito Sans", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.piece p {
  margin: 0 0 12px;
  color: rgba(243,243,243,.88);
  font: 300 15px/1.5 "Nunito Sans", sans-serif;
  letter-spacing: 0.2px;
}
.see {
  display: inline-flex;
  margin-top: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(243,243,243,.45);
  border-radius: 999px;
  color: #f3f3f3;
  font: 400 11px/1 "Nunito Sans", sans-serif;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}
.see:hover { opacity: .65; }
@media (max-width: 800px) {
  :is(#sandbox, #portfolio) .feed-cards { padding: 20px 24px 28px; }
  :is(#sandbox, #portfolio) .sheet { padding: 8px 24px 36px; }
}
:is(#sandbox, #portfolio) .card-slider { position: relative; }
:is(#sandbox, #portfolio) .card-viewport { overflow: hidden; margin: 0 72px; }
:is(#sandbox, #portfolio) .card-track { display: flex; transition: transform .7s ease; }
:is(#sandbox, #portfolio) .card-track > .grid {
  flex: 0 0 auto;
  width: var(--slide);
  min-width: 0;
  box-sizing: border-box;
  padding-right: 0;
}
:is(#sandbox, #portfolio) .card-chev {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 43px;
  height: 58px;
  padding: 0;
  border: 0;
  background: none;
  color: #f3f3f3;
  font: 50px/1 "Nunito Sans", sans-serif;
  cursor: pointer;
}
:is(#sandbox, #portfolio) .card-chev-prev { left: 0; }
:is(#sandbox, #portfolio) .card-chev-next { right: 0; }
:is(#sandbox, #portfolio) .card-chev:hover { opacity: .6; }
:is(#sandbox, #portfolio) .card-chev:disabled { opacity: .25; cursor: default; }
:is(#sandbox, #portfolio) .card-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
}
:is(#sandbox, #portfolio) .card-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(243,243,243,.35);
  cursor: pointer;
  transition: width .35s ease, background .35s ease;
}
:is(#sandbox, #portfolio) .card-dots button.is-on { width: 28px; background: #f0a030; }
@media (max-width: 800px) {
  :is(#sandbox, #portfolio) .card-track > .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  :is(#sandbox, #portfolio) .work { scroll-behavior: auto; }
  :is(#sandbox, #portfolio) .card-track,
  :is(#sandbox, #portfolio) .card-dots button { transition: none; }
}
.piece-body { max-width: 40rem; }
.piece-body ul, .piece-body ol { margin: 0 0 16px; padding-left: 1.3em; color: rgba(243,243,243,.88); font: 300 15px/1.5 "Nunito Sans", sans-serif; letter-spacing: 0.2px; }
.piece-body li + li { margin-top: 6px; }
.piece-body blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 1px solid rgba(243,243,243,.45); color: rgba(243,243,243,.7); font: 300 15px/1.5 "Nunito Sans", sans-serif; }
.piece-body code { padding: 1px 5px; border-radius: 4px; background: rgba(243,243,243,.1); font: 400 13px/1.4 ui-monospace, Menlo, monospace; }
.piece-body a { color: #f3f3f3; }
.piece-image { display: block; width: 100%; height: auto; margin: 0 0 24px; }
