@font-face {
  font-family: "Hanken Grotesk V2";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/HankenGrotesk-V2-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Hanken Grotesk V2";
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/HankenGrotesk-900.ttf") format("truetype");
}

body[data-page="home"] {
  --mobile-grid-margin: 12px;
  --mobile-grid-gap: 20px;
  --mobile-grid-columns: repeat(4, minmax(0, 1fr));
  --mobile-nav-height: 47px;
  background: #fff;
}
body[data-page="home"] .home-index-nav { height: var(--mobile-nav-height); background: #fff; }
body[data-page="home"] :is(.home-index-works, .page-footer) { display: none; }

body[data-page="home"] .home-index-nav-inner,
.mobile-project-index {
  display: grid;
  grid-template-columns: var(--mobile-grid-columns);
  column-gap: var(--mobile-grid-gap);
  padding-inline: var(--mobile-grid-margin);
}

body[data-page="home"] .home-index-nav-inner {
  align-items: start;
  justify-items: start;
  height: var(--mobile-nav-height);
  padding-top: 13px;
}

body[data-page="home"] .home-index-nav :is(a, button) {
  font: 800 16px / 25px "Portfolio Nav", Arial, sans-serif;
  letter-spacing: -.03em;
}

body[data-page="home"] .home-index-brand { grid-column: span 2; }
body[data-page="home"] .home-index-nav :is(a, button):focus-visible { color: #000; }

.mobile-project-index {
  grid-auto-rows: 1fr;
  padding-block: var(--mobile-nav-height) 0;
  font: 600 13px / 1.2544 "Hanken Grotesk V2", "Hanken Grotesk", Arial, sans-serif;
  font-synthesis: none;
  letter-spacing: -.06em;
}

.mobile-project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-column: 1 / -1;
  min-width: 0;
}

.mobile-project-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: clip;
  background: #f4f4f4;
}

.mobile-project-cover > :is(a, img, .moflin-video-frame),
.mobile-project-cover img {
  display: block;
  width: 100%;
  height: 100%;
}

.mobile-project-cover img,
.mobile-project-cover .moflin-video-frame .moflin-video { object-fit: cover; }
.mobile-project-cover a:focus-visible { outline-offset: -4px; }

.mobile-project-cover .moflin-audio-toggle {
  inset: auto 8px 8px auto;
  width: 44px;
  height: 44px;
  transform: none;
  background-position: center;
  background-size: 28px;
  filter: brightness(0) invert(1) drop-shadow(0 0 2px rgb(0 0 0 / .8));
}

.mobile-project-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 95px;
  overflow: clip;
  padding: 8px;
  background: #000;
  color: #fff;
}

.mobile-project-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(58%) minmax(0, 1fr);
  align-items: start;
  column-gap: 4px;
}

.mobile-project-meta h2 { margin: 0; font: inherit; }
.mobile-project-meta p { color: #bfbfbf; text-align: center; }
.mobile-project-meta time { justify-self: end; }

@media (width < 375px) {
  .mobile-project-meta { min-height: 2lh; }
}

.mobile-project-description {
  width: 50%;
  text-align: left;
  overflow-wrap: anywhere;
}

.mobile-project-info :is(.mobile-project-more, .project-soon) {
  position: absolute;
  right: 0;
  width: 104px;
}

.mobile-project-info .project-soon {
  bottom: -5px;
  height: auto;
}

.mobile-project-more {
  bottom: -17px;
  padding: 0;
  background: none;
  color: inherit;
  font: 900 45.589px / 59px "Hanken Grotesk V2", "Hanken Grotesk", Arial, sans-serif;
  letter-spacing: -1.8236px;
  text-align: right;
  cursor: pointer;
}

/* Composite the light text separately to avoid colored subpixel edges on black. */
.mobile-project-meta, .mobile-project-description, .mobile-project-more {
  transform: translateZ(0);
}

.mobile-project-more:focus-visible { outline-color: #fff; outline-offset: -3px; }

.mobile-project-index .v2-detail { width: min(32rem, 90vw); padding: 24px; }
.mobile-project-index .v2-detail::backdrop { background: rgb(0 0 0 / .35); }
.mobile-project-index .v2-detail form { display: flex; justify-content: flex-end; }
.mobile-project-index .v2-detail button { padding: 0; background: none; text-decoration: underline; }

/* Keep the mobile entrance subtle; cards are revealed before entering view. */
@media (prefers-reduced-motion:no-preference) {
  .mobile-project-card:is([data-scroll-reveal="pending"],[data-scroll-reveal="reset"]) { translate:0 8px; }
  .mobile-project-card[data-scroll-reveal]:focus-within { translate:none; }
}
