@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-latin-ext.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-latin-ext-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Instrument Sans", sans-serif;
  font-weight: 500;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* Cap at the 1440 Figma artboard so frames don't grow on very wide screens.
   Intro group is centered with a 580px max width and 430px side padding.
   Article cards and the work grid use 100px side padding. */
.page {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.intro-wrap {
  padding: 100px 430px 0;
}

.intro {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  color: #777777;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -0.034em;
  text-align: left;
}

.intro-home,
.intro-article {
  gap: 88px;
}

.site-name {
  margin: 0;
  color: #777777;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
}

.site-name a {
  color: inherit;
  text-decoration: none;
}

.site-name a:hover,
.site-name a:active {
  color: inherit;
  text-decoration: none;
}

.site-name a:focus-visible {
  outline: 1px solid #000;
  outline-offset: 3px;
}

.home-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-stack .bio {
  margin: 0;
}

.profile-clip {
  display: block;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  object-fit: cover;
  background: #fff;
}

.article-copy {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.article-copy h1 {
  margin: 0;
  color: #000;
  font: inherit;
  font-weight: 600;
}

.intro-body {
  max-width: 580px;
  margin: 0;
  padding: 0 0 0 1.5em;
  list-style: decimal;
  list-style-position: outside;
}

.intro-body li {
  margin: 0;
  padding: 0;
}

.intro-body li + li {
  margin-top: 16px;
}

.intro-name,
.dot,
.association {
  color: #000;
}

.dot,
.association {
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration: underline dotted;
  text-decoration-style: dotted;
  text-decoration-thickness: 0.085em;
  text-decoration-color: currentColor;
  text-decoration-skip-ink: auto;
}

/* Home dotted tokens: 15% offset. Article name uses 22.5%. */
.dot {
  text-underline-offset: 0.15em;
}

.association {
  text-underline-offset: 0.225em;
}

.hover-target {
  cursor: pointer;
}

.hover-target:focus-visible {
  outline: 1px solid #000;
  outline-offset: 3px;
}

.articles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 48px 100px 160px;
}

.article-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 346px;
  background: #ffaaaa;
  border: 1px solid #ececec;
  border-radius: 32px;
  color: inherit;
  text-decoration: none;
}

a.article-card:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.article-caption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  height: 103px;
  padding: 24px;
}

.article-caption h2,
.article-caption p {
  margin: 0;
  color: #fff;
  line-height: 1.34;
  letter-spacing: -0.034em;
  text-align: left;
}

.article-caption h2 {
  font-size: 24px;
  font-weight: 600;
}

.article-caption p {
  font-size: 17px;
  font-weight: 500;
}

.work {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 56px;
  margin: 128px 100px 168px;
}

.work-item {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
}

.media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}

/* Crop the 1px capture hairline on the video edges, not the UI in the picture. */
.media video {
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  margin: -2px;
  object-fit: cover;
  background: #fff;
  border: 0;
}

.media video[hidden] {
  display: none;
}

.media video.is-zoomed {
  transform: scale(var(--media-zoom, 1));
}

/* Article 2 clip 4: fill the square’s height and anchor bottom-left.
   Overrides the generic +4px hairline + object-fit: cover so the chyron
   is not shaved. Extra width is clipped on the right by .media overflow,
   so the two-column grid and clip 5 do not overlap. */
.media video.is-anchor-bottom-left {
  position: absolute;
  left: 0;
  bottom: 0;
  width: auto;
  height: 100%;
  margin: 0;
  object-fit: fill;
  object-position: left bottom;
}

.work-item figcaption {
  margin: 0;
  padding: 0 48px;
  color: #808080;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.034em;
  text-align: center;
}

/* Hover previews only (.preview / .home-hover-media). Do not apply to .media work-grid clips. */
.preview {
  position: fixed;
  left: 0;
  top: 0;
  width: 256px;
  max-width: min(256px, calc(100vw - 24px));
  height: auto;
  aspect-ratio: 256 / 152;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transform-origin: 0 100%;
  filter: blur(24px) drop-shadow(0 16px 28px rgba(0, 0, 0, 0.18));
  transition:
    opacity 300ms ease-out,
    transform 300ms ease-out,
    filter 300ms ease-out;
  object-fit: cover;
  object-position: center;
}

video.preview,
img.preview {
  display: block;
  width: 100%;
  background: #fff;
  object-fit: cover;
  object-position: center;
}

.preview--rounded {
  border-radius: 24px;
}

/* Home Crypto.com hover (t143): 1.5× Frieren width, native 2090:1080 box (~384×198), no cover crop.
   Specificity must beat `.preview` and `video.preview` (256×152 cover). */
html body.page-home video.preview.preview--crypto,
body.page-home video.preview.preview--crypto,
video.preview.preview--crypto,
.preview.preview--crypto {
  width: 384px;
  max-width: min(384px, calc(100vw - 24px));
  height: auto;
  aspect-ratio: 384 / 198;
  object-fit: contain;
  object-position: center;
  border-radius: 24px;
  background: #fff;
}

/* Home Frieren hover (t148): same 198px height as Crypto.com, width from native
   1730:1080 (198 × 1730/1080 ≈ 317.17px). Box sized to aspect, contain, no cover crop.
   Specificity must beat `.preview` and `video.preview` (256×152 cover). */
html body.page-home video.preview.preview--frieren,
body.page-home video.preview.preview--frieren,
video.preview.preview--frieren,
.preview.preview--frieren {
  width: calc(198px * 1730 / 1080);
  max-width: min(calc(198px * 1730 / 1080), calc(100vw - 24px));
  height: auto;
  aspect-ratio: 1730 / 1080;
  object-fit: contain;
  object-position: center;
  border-radius: 24px;
  background: #fff;
}

/* Interactive card hugs video + toggle; the media box uses the shared 256×152 ratio. */
.preview--interactive {
  aspect-ratio: auto;
  height: auto;
  object-fit: none;
}

.preview.is-visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0) drop-shadow(0 16px 28px rgba(0, 0, 0, 0.18));
}

/* Smaller floating icon hover (Article 2 “Some symbols”).
   Scoped modifier: do not change 256×152 cover cropping on other .preview / .media.
   Specificity must beat `video.preview, img.preview` and `body.page-home img.preview`
   (white background) when the article modal portals this preview onto a page-home body. */
html img.preview.preview--icon,
body img.preview.preview--icon,
body.page-home img.preview.preview--icon,
.preview.preview--icon,
img.preview.preview--icon {
  width: 120px;
  max-width: min(120px, calc(100vw - 24px));
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  background: transparent;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 1200px) {
  .work {
    column-gap: 32px;
    row-gap: 48px;
  }
}

/* Phone and portrait tablets: one column, tighter padding.
   430px intro sides would leave almost no room for the text. */
@media (max-width: 959px) {
  .intro-wrap {
    padding: 72px 32px 0;
  }

  .intro {
    max-width: none;
  }

  .intro-home,
  .intro-article {
    gap: 48px;
  }

  .article-copy {
    gap: 32px;
  }

  .intro-body {
    max-width: none;
  }

  .articles {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 48px 32px 96px;
  }

  .work {
    grid-template-columns: 1fr;
    margin: 72px 32px 96px;
    row-gap: 48px;
  }

  .media {
    border-radius: 24px;
  }

  .work-item figcaption {
    padding: 0 8px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview {
    transition: none;
    transform: scale(1);
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.18));
  }

  .preview:not(.is-visible) {
    opacity: 0;
  }
}


/* Home (Figma 167:309). Scoped so Article 1 and 2 keep their existing intro styles. */
/* Lock the document viewport on Home only. Articles must still scroll,
   including the Home sheet modal (.pt-sheet-scroll). */
html:has(body.page-home) {
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.page-home {
  font-family: "Instrument Sans", "PingFang HK", "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", sans-serif;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100svh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.page-home .home-layout {
  display: flex;
  flex-direction: column;
  /* Full viewport, left-aligned. Override .page's 1440 centered cap
     (articles keep that cap so work-grid clips do not grow).
     Fill the visible viewport at every breakpoint. A 100vh min-height is
     taller than iOS/iPad Safari when the toolbar is showing and causes a
     short scroll. */
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 20px 56px 56px;
  box-sizing: border-box;
}

body.page-home .home-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  /* 0 so a short landscape viewport cannot be forced taller than the
     shell; leftover space still sits between the clip and the text. */
  gap: 0;
}

body.page-home .home-clip {
  position: relative;
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  overflow: hidden;
  clip-path: inset(0);
  background: #fff;
  border: 0;
  outline: none;
  box-shadow: none;
  border-radius: 0;
  line-height: 0;
  /* no transform on the wrapper — a wrapper layer can itself draw a compositor seam */
}

body.page-home .home-clip::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px #fff;
  border-radius: inherit;
}

body.page-home .home-clip-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #fff;
  border: 0;
  outline: none;
  box-shadow: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transform: scale(1.05);
  transform-origin: center center;
}

body.page-home .home-clip-video:focus,
body.page-home .home-clip-video:focus-visible {
  outline: none;
}

body.page-home .home-clip-video::-webkit-media-controls,
body.page-home .home-clip-video::-webkit-media-controls-enclosure,
body.page-home .home-clip-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  appearance: none;
  -webkit-appearance: none;
}

body.page-home .home-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  /* Desktop/tablet (min-width: 800px): fixed 630px text box, left-aligned
     (Figma Responsive 223:71). Mobile (max-width: 799px) resets max-width to none. */
  max-width: 630px;
}

body.page-home .home-main {
  display: flex;
  flex-direction: column;
  gap: 29px;
  width: 100%;
  max-width: 630px;
}

body.page-home .home-name {
  margin: 0;
  color: #000;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.53;
  letter-spacing: -0.034em;
}

body.page-home .home-bio-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body.page-home .home-bio-stack p {
  margin: 0;
  color: #808080;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.53;
  letter-spacing: -0.034em;
}

body.page-home .home-dot,
body.page-home .home-solid {
  color: #000;
  text-decoration-line: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.25em;
  text-decoration-skip-ink: auto;
}

body.page-home .home-dot,
body.page-home .home-solid,
body.page-home a.home-solid {
  text-decoration-thickness: 0.11em;
  transition: text-decoration-color 180ms ease-out;
}

body.page-home .home-dot {
  text-decoration-style: dotted;
}

body.page-home .home-solid,
body.page-home a.home-solid {
  color: #000;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: #000;
  text-underline-offset: 0.25em;
  text-decoration-skip-ink: auto;
}

body.page-home a.home-solid:focus-visible {
  outline: 1px solid #000;
  outline-offset: 3px;
}

body.page-home .home-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-home .home-clock {
  margin: 0;
  color: #808080;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.034em;
  text-decoration: none;
}

/* Home mobile typography/text-box (Figma 183:45, 375px). Desktop/tablet from 800px up. */
@media (max-width: 799px) {
  /* Height / no-scroll lock now lives on the base Home rules (all breakpoints). */
  body.page-home .home-layout {
    padding: 20px 20px 32px;
  }

  body.page-home .home-col {
    max-width: none;
  }

  body.page-home .home-clip {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
  }

  body.page-home .home-copy,
  body.page-home .home-main {
    max-width: none;
  }

  body.page-home .home-copy {
    flex: 0 0 auto;
    gap: 12px;
  }

  body.page-home .home-main {
    gap: 31px;
  }

  body.page-home .home-name,
  body.page-home .home-bio-stack p {
    font-size: 20px;
    line-height: 1.53;
  }

  body.page-home .home-bio-stack {
    gap: 22px;
  }
}


/* Home hover previews and Rest/Work toggle (t86). Scoped so Article 1/2 stay unchanged. */
body.page-home img.preview {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  object-fit: cover;
  object-position: center;
}

body.page-home .preview--interactive {
  pointer-events: none;
  background: transparent;
  transform-origin: 50% 100%;
}

body.page-home .preview--interactive.is-visible {
  pointer-events: auto;
}

body.page-home .preview--interactive.is-toggle-near-top {
  transform-origin: 50% 0;
}

body.page-home .home-hover-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

body.page-home .home-hover-media {
  position: relative;
  width: 100%;
  aspect-ratio: 256 / 152;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

body.page-home .home-hover-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

body.page-home .home-hover-video.is-active {
  opacity: 1;
}

/* Rest/Work toggle, scaled down from the previous 141×55 / 24px SemiBold control (2/3). */
body.page-home .home-hover-toggle {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 94px;
  height: 37px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: #1f535e;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 200ms ease-out;
}

body.page-home .home-hover-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2.2px;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  transition: left 200ms ease-out;
}

body.page-home .home-hover-toggle-label {
  position: absolute;
  top: 0;
  left: 44.7px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font: inherit;
  color: inherit;
  pointer-events: none;
  white-space: nowrap;
}

body.page-home .home-hover-toggle[data-state="rest"] {
  background: #1f535e;
}

body.page-home .home-hover-toggle[data-state="work"] {
  background: #00a3ff;
}

body.page-home .home-hover-toggle[data-state="work"] .home-hover-toggle-knob {
  left: 58.5px;
}

body.page-home .home-hover-toggle[data-state="work"] .home-hover-toggle-label {
  left: 10.7px;
}

body.page-home .home-hover-toggle:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  body.page-home .home-hover-toggle,
  body.page-home .home-hover-toggle-knob {
    transition: none;
  }
}


/* Article 1 and Article 2 (Figma 4:61 desktop, 204:119 mobile). Scoped so Home stays unchanged. */
:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-wrap {
  padding: 104px 80px 0;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro {
  max-width: 635px;
  margin: 0 auto;
  color: #808080;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.53;
  letter-spacing: -0.034em;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-article,
:is(body, .pt-article):is(.page-article-1, .page-article-2) .article-copy {
  gap: 32px;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .article-copy h1,
:is(body, .pt-article):is(.page-article-1, .page-article-2) .site-name {
  color: #000;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.53;
  letter-spacing: -0.034em;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-body {
  max-width: 635px;
  margin: 0;
  padding: 0 0 0 27px;
  color: #808080;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.53;
  letter-spacing: -0.034em;
  list-style: none;
  counter-reset: article-point;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-body li {
  position: relative;
  margin: 0;
  padding: 0;
  counter-increment: article-point;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-body li + li {
  margin-top: 12px;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-body li::before {
  content: counter(article-point) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: 27px;
  margin-left: -27px;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .work {
  column-gap: 32px;
  row-gap: 56px;
  margin: 80px 80px 168px;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .work-item {
  gap: 24px;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .media {
  border-radius: 40px;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .work-item figcaption {
  padding: 0 48px;
  color: #808080;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.53;
  letter-spacing: -0.034em;
  text-align: center;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .article-dot {
  color: #000;
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 0.11em;
  text-decoration-color: #000;
  text-underline-offset: 0.25em;
  text-decoration-skip-ink: auto;
  transition: text-decoration-color 180ms ease-out;
}

:is(body, .pt-article):is(.page-article-1, .page-article-2) .article-back-to-top {
  display: none;
}

@media (max-width: 959px) {
  :is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-wrap {
    padding: 64px 20px 0;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .intro,
  :is(body, .pt-article):is(.page-article-1, .page-article-2) .intro-body {
    max-width: none;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .work {
    /* Keep the desktop 2-column grid on small widths. minmax(0, 1fr)
       lets tiles shrink below content min-size so they do not overflow. */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 56px 20px 0;
    column-gap: 12px;
    row-gap: 24px;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .work-item {
    gap: 12px;
    min-width: 0;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .media {
    border-radius: 16px;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .work-item figcaption {
    padding: 0 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.034em;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .article-back-to-top {
    display: block;
    margin: 32px 20px 80px;
    text-align: center;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .article-back-to-top-btn {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #000;
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.53;
    letter-spacing: -0.034em;
    text-align: center;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 0.11em;
    text-decoration-color: #000;
    text-underline-offset: 0.25em;
    text-decoration-skip-ink: auto;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  :is(body, .pt-article):is(.page-article-1, .page-article-2) .article-back-to-top-btn:focus-visible {
    outline: 1px solid #000;
    outline-offset: 3px;
  }
}

/* Hide the trigger underline while that hover preview is showing,
   or while a solid/dotted link is :focus-visible.
   Must beat body.page-home .home-dot and :is(body, .pt-article).page-article-* .article-dot,
   which set text-decoration-color: #000 at higher specificity than .home-dot.is-hovering.
   :hover is NOT in this block: after a tap or after the article sheet
   closes, iOS and desktop browsers can leave :hover stuck on the same
   live Home <a class="home-solid"> (motion / association). */
html body.page-home .home-dot.is-hovering,
html body.page-home .home-solid.is-hovering,
html body.page-home .home-solid:focus-visible,
html body.page-home a.home-solid:focus-visible,
html body.page-home .pt-scenery .home-dot.is-hovering,
html body.page-home .pt-scenery .home-solid.is-hovering,
html body.page-home .pt-scenery .home-solid:focus-visible,
html body.page-home .pt-scenery a.home-solid:focus-visible,
:is(body, .pt-article).page-article-1 .article-dot.is-hovering,
:is(body, .pt-article).page-article-2 .article-dot.is-hovering {
  text-decoration-color: transparent;
  -webkit-text-decoration-color: transparent;
}

/* Desktop hover-hide only. Gating to fine pointers avoids iOS sticky
   :hover after tapping motion/association/mail/instagram. html.is-clearing-hover
   covers the desktop case where :hover stays on the clicked link until
   the pointer moves after the sheet closes. */
@media (hover: hover) and (pointer: fine) {
  html:not(.is-clearing-hover) body.page-home .home-dot.hover-target:hover,
  html:not(.is-clearing-hover) body.page-home .home-solid:hover,
  html:not(.is-clearing-hover) body.page-home a.home-solid:hover,
  html:not(.is-clearing-hover) body.page-home .pt-scenery .home-dot.hover-target:hover,
  html:not(.is-clearing-hover) body.page-home .pt-scenery .home-solid:hover,
  html:not(.is-clearing-hover) body.page-home .pt-scenery a.home-solid:hover,
  :is(body, .pt-article).page-article-1 .article-dot.hover-target:hover,
  :is(body, .pt-article).page-article-2 .article-dot.hover-target:hover {
    text-decoration-color: transparent;
    -webkit-text-decoration-color: transparent;
  }
}

/* Home preview cards stay under the article sheet if they remain on body during the modal. */
html.is-article-modal .preview.preview--home {
  z-index: 20;
  visibility: hidden;
  pointer-events: none;
}

/* Page transition (Home push-back + article sheet), after Marvin Schwaibold. */
html.is-page-transitioning,
html.is-page-transitioning body {
  overflow: hidden;
  background: #050505;
}

.pt-scenery {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: #fff;
  transform-origin: 50% 0;
  will-change: transform, border-radius;
}

.pt-overlay {
  position: fixed;
  inset: 0;
  z-index: 41;
  background: #050505;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.pt-sheet {
  --pt-sheet-inset: 24px;
  position: fixed;
  top: var(--pt-sheet-inset);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 42;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  will-change: transform;
}

.pt-sheet-handle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 8px 0 4px;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.pt-sheet-handle::before {
  content: "";
  width: 36px;
  height: 5px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.22);
}

@media (pointer: coarse), (max-width: 799px) {
  .pt-sheet-handle {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pt-scenery,
  .pt-overlay,
  .pt-sheet {
    transition: none !important;
  }
}

html.is-article-modal,
html.is-article-modal body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
  background: #050505;
}

html.is-page-transitioning .pt-scenery,
html.is-article-modal .pt-scenery {
  pointer-events: none;
}

html.is-article-modal .pt-overlay {
  pointer-events: auto;
}

html.is-page-transitioning .pt-sheet,
html.is-article-modal .pt-sheet {
  overflow: hidden;
}

.pt-sheet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: inherit;
  touch-action: pan-y;
}

.pt-article {
  min-height: 100%;
  background: #fff;
}

html.is-article-modal .preview {
  z-index: 60;
}
