:root {
  --page-pad: 24px;
  --topbar-height: 133px;
  --intro-top: 94px;
  --display-size: 38px;
  --display-leading: 1.3;
  --meta-size: 20px;
  --grid-gap: 28px;
  --gray: #adadad;
  --ink: #2d2d2d;
  --underline-thickness: 2px;
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-menu: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  min-height: 100%;
  background: #fff;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

body.lang-zh {
  --display-size: 36px;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

body.lang-zh .intro-copy,
body.lang-zh .bio-extended {
  font-weight: 470;
  line-height: 1.3;
}

button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 75;
  height: var(--topbar-height);
  pointer-events: none;
  background: linear-gradient(180deg, #fff 44.329%, rgb(255 255 255 / 75%) 75.668%, rgb(255 255 255 / 0%) 99.911%);
  transition: height 500ms var(--ease-reveal);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(5.4px);
  -webkit-backdrop-filter: blur(5.4px);
  mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgb(0 0 0 / 45%) 62%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgb(0 0 0 / 45%) 62%, transparent 92%);
}

body.compact .topbar,
body.detail-open .topbar {
  height: 224px;
}

body.menu-open .topbar {
  background: transparent;
}

body.menu-open .topbar::before { display: none; }

.menu-button {
  position: absolute;
  top: 37px;
  left: 28px;
  z-index: 80;
  width: 34px;
  height: 27px;
  cursor: pointer;
  pointer-events: auto;
}

.menu-line {
  position: absolute;
  left: 0;
  width: 34px;
  height: 3px;
  background: #000;
  transform-origin: center;
  transition: transform 350ms var(--ease-menu), opacity 250ms ease;
}

.menu-line-1 { top: 1px; }
.menu-line-2 { top: 12.5px; }
.menu-line-3 { top: 24px; }

.menu-button.open .menu-line-1 { transform: translateY(11.5px) rotate(45deg); }
.menu-button.open .menu-line-2 { opacity: 0; }
.menu-button.open .menu-line-3 { transform: translateY(-11.5px) rotate(-45deg); }

.language-switch {
  position: absolute;
  top: 27px;
  right: 24px;
  z-index: 80;
  width: 90px;
  height: 46px;
  border: 2px solid #000;
  border-radius: 24px;
  cursor: pointer;
  pointer-events: auto;
}

.language-pill {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2d2d2d;
  transition: transform 350ms var(--ease-menu);
}

body.lang-zh .language-pill {
  transform: translateX(-42px);
}

.language-label {
  position: absolute;
  top: 9px;
  z-index: 1;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  transition: color 250ms ease;
}

.language-zh { left: 12px; font-weight: 500; }
.language-en { right: 8px; letter-spacing: 0.02em; }
body:not(.lang-zh) .language-en,
body.lang-zh .language-zh { color: #fff; }
body:not(.lang-zh) .language-zh,
body.lang-zh .language-en { color: var(--ink); }

.home-link {
  position: fixed;
  top: var(--intro-top);
  left: var(--page-pad);
  z-index: 80;
  width: auto;
  cursor: default;
  font-size: var(--display-size);
  font-weight: 500;
  line-height: var(--display-leading);
  text-align: left;
  text-decoration: none;
  transition: top 650ms var(--ease-reveal), left 650ms var(--ease-reveal), color 200ms ease;
}

body.menu-open .home-link {
  opacity: 0;
  pointer-events: none;
}

body.scrolled .home-link,
body.compact .home-link,
body.detail-open .home-link {
  top: 25px;
  left: 87px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.menu-panel {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  width: 595px;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-16px);
  background: linear-gradient(90deg, rgb(255 255 255 / 100%) 44.329%, rgb(255 255 255 / 75%) 75.668%, rgb(255 255 255 / 0%) 99.911%);
  transition: opacity 300ms ease, transform 450ms var(--ease-reveal);
}

.menu-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  mask-image: linear-gradient(90deg, #000 0%, #000 32%, rgb(0 0 0 / 40%) 68%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 32%, rgb(0 0 0 / 40%) 68%, transparent 100%);
}

.menu-panel.open {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}

.menu-list {
  position: relative;
  z-index: 1;
  width: 352px;
  max-height: 0;
  margin: 88px 0 0 28px;
  overflow: hidden;
  opacity: 0;
  transition: max-height 450ms var(--ease-reveal), opacity 300ms ease;
}

.menu-panel.open .menu-list {
  max-height: 760px;
  opacity: 1;
}

.menu-main {
  display: block;
  margin: 0 0 24px;
  cursor: pointer;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.menu-sub {
  margin: -7px 0 24px;
  color: #7f7f7f;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.menu-sub button {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-layer {
  position: relative;
  z-index: auto;
  min-height: 100vh;
  padding: var(--intro-top) var(--page-pad) 80px;
}

.intro-section {
  position: relative;
}

.intro-copy {
  margin: 0;
  color: var(--gray);
  font-size: var(--display-size);
  font-weight: 500;
  line-height: var(--display-leading);
}

.home-placeholder {
  color: transparent;
  user-select: none;
}

.intro-strong { color: var(--ink); }

.intro-link {
  cursor: pointer;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness);
  text-underline-offset: 2px;
}

.bio-toggle {
  position: relative;
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-left: 0.18em;
  cursor: pointer;
  color: #000;
  vertical-align: 0.02em;
  transition: transform 350ms var(--ease-menu), color 200ms ease;
}

.bio-toggle::before,
.bio-toggle::after {
  content: "";
  position: absolute;
  top: calc(50% - 1.5px);
  left: 0;
  width: 100%;
  height: 3px;
  background: currentColor;
  transform-origin: center;
}

.bio-toggle::after { transform: rotate(90deg); }
body.bio-expanded .bio-toggle { transform: rotate(45deg); }

.bio-extended { color: var(--ink); }
.bio-extended[hidden] { display: none; }

.word-wrap {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  vertical-align: bottom;
}

.word-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(115%);
  will-change: transform, opacity;
}

.word-inner.revealed {
  animation: word-up 1s var(--ease-reveal) forwards;
}

@keyframes word-up {
  from { opacity: 0; transform: translateY(115%); }
  to { opacity: 1; transform: translateY(0); }
}

.category-area {
  position: sticky;
  top: 103px;
  z-index: 90;
  margin-top: 47px;
}

.category-primary {
  display: block;
  width: fit-content;
  border: 3px solid #000;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
}

.category-primary { min-height: 56px; padding: 4px 17px; }

.category-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
}

.category-secondary .subcategory-pill {
  min-height: 48px;
  padding: 0 15px;
  border: 3px solid var(--gray);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
}
.category-secondary[hidden] { display: none; }
.category-area.has-secondary .category-primary,
.category-area.child-selected .category-primary { border-color: var(--gray); color: var(--gray); }
.category-area a,
.category-area button,
.category-area .clickable {
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness);
  text-underline-offset: 2px;
}

.category-area button { color: var(--ink); }

body.lang-zh .intro-link,
body.lang-zh .home-link,
body.lang-zh .menu-main,
body.lang-zh .menu-sub button,
body.lang-zh .category-area button { text-underline-offset: 6px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 35px var(--grid-gap);
  margin-top: 47px;
}

.project-grid[hidden] { display: none; }

body.has-category .project-grid { margin-top: 25px; }
body.bio-expanded .project-grid { margin-top: 71px; }

@media (min-width: 769px) {
  .intro-copy { max-width: calc(100vw - var(--page-pad) - 114px); }

  body.lang-zh .intro-copy,
  body.lang-zh .bio-extended,
  body.lang-zh .home-link {
    font-size: 32px;
    font-weight: 450;
  }

  body.lang-zh.scrolled .home-link,
  body.lang-zh.compact .home-link,
  body.lang-zh.detail-open .home-link { top: 30px; }

  body.lang-zh .category-secondary .subcategory-pill {
    min-height: 49px;
    padding-bottom: 4px;
  }

  #categoryArea:has(#categorySecondary:not([hidden])) + .project-grid { margin-top: 20px; }
}

.project-card {
  min-width: 0;
  cursor: pointer;
}

.project-media {
  width: 100%;
  aspect-ratio: 541 / 540;
  overflow: hidden;
  background: #fff;
}

.project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms var(--ease-reveal);
}

.project-meta {
  min-height: 115px;
  padding-top: 17px;
  font-size: var(--meta-size);
  font-weight: 500;
  line-height: 1.3;
  white-space: pre-line;
  transition: color 200ms ease;
}

body.compact .intro-section,
body.detail-open .intro-section { display: none; }

body.compact .content-layer,
body.detail-open .content-layer { padding-top: 103px; }

body.compact .category-area,
body.detail-open .category-area { margin-top: 0; }
body.menu-open .category-area { z-index: 0; }

.project-detail {
  display: grid;
  grid-template-columns: 600fr 963fr;
  gap: 38px 41px;
  padding: 29px 38px 80px;
}

.project-detail[hidden] { display: none; }

.detail-media {
  height: 599px;
  overflow: hidden;
  background: #d9d9d9;
}

.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-media-square { width: 600px; max-width: 100%; }
.detail-media-wide { width: 100%; }
.detail-meta { grid-column: 1; font-size: 20px; line-height: 1.3; white-space: pre-line; }
.detail-description { grid-column: 1 / -1; width: 1064px; max-width: 100%; margin: 24px 0 0; font-size: 20px; font-weight: 400; line-height: 1.3; }

@media (hover: hover) and (pointer: fine) {
  .project-card:hover .project-media img { transform: scale(1.115); }
  .project-card:hover .project-meta,
  .intro-link:hover,
  .menu-main:hover,
  .menu-sub button:hover,
  .home-link:hover,
  .category-primary:hover,
  .category-secondary:hover,
  .detail-meta:hover,
  .detail-description:hover { color: var(--gray); }

  .language-label:hover { color: var(--gray) !important; }
  .category-area button:hover { color: var(--gray); }
  .bio-toggle:hover { color: #000; }
}

@media (max-width: 768px) {
  :root {
    --topbar-height: 94px;
    --intro-top: 69px;
    --display-size: 24px;
    --meta-size: 15px;
    --grid-gap: 32px;
  }

  body.lang-zh { --display-size: 20px; }
  body.lang-zh .intro-link,
  body.lang-zh .home-link,
  body.lang-zh .menu-main,
  body.lang-zh .menu-sub button,
  body.lang-zh .category-area button { text-underline-offset: 4px; }
  body.lang-zh .home-link { text-decoration-thickness: var(--underline-thickness); }
  .mobile-en-line { display: block; white-space: nowrap; }
  .mobile-en-extended { display: block; }

  body.compact .topbar,
  body.detail-open .topbar { height: 142px; }

  .menu-button { top: 24px; left: 24px; }

  .language-switch {
    top: 18px;
    right: 24px;
    width: 71px;
    height: 38px;
    border-radius: 19px;
  }

  .language-pill { top: 3px; right: 3px; width: 28.195px; height: 28.195px; }
  body.lang-zh .language-pill { transform: translateX(-32px); }
  .language-label { top: 8px; font-size: 14px; }
  .language-zh { left: 10px; letter-spacing: -0.04em; }
  .language-en { right: 6px; }

  body.scrolled .home-link,
  body.compact .home-link,
  body.detail-open .home-link { top: 22px; left: 76px; }

  body.lang-zh.scrolled .home-link,
  body.lang-zh.compact .home-link,
  body.lang-zh.detail-open .home-link { top: 25px; }

  .menu-panel {
    width: 100%;
    background: linear-gradient(90deg, #fff 56.114%, rgb(255 255 255 / 50%) 99.911%);
  }

  .menu-list { width: 288px; margin: 62px 0 0 28px; }
  .menu-panel.open .menu-list { max-height: 760px; }
  .menu-main { margin-bottom: 21px; font-size: 28px; }
  .menu-sub { margin-top: -7px; margin-bottom: 21px; color: var(--gray); font-size: 22px; }

  .content-layer { padding-bottom: 56px; }
  .project-grid { grid-template-columns: 1fr; gap: 32px; margin-top: 31px; }
  body.lang-zh:not(.has-category) .project-grid { margin-top: 19px; }
  body.has-category .project-grid { margin-top: 15px; }
  body.bio-expanded .project-grid { margin-top: 36px; }
  .project-meta { min-height: 93px; padding-top: 13px; line-height: 1; }

  .category-area {
    top: 75px;
    max-width: 100%;
    margin-top: 23px;
  }
  .category-primary {
    max-width: 100%;
    border-width: 2.25px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .category-secondary { max-width: 100%; gap: 8px; }
  .category-area button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .category-primary { min-height: 42px; padding: 3px 13px; font-size: 24px; line-height: 1.3; }
  .category-secondary { margin-top: 10px; }
  .category-secondary .subcategory-pill {
    min-height: 32px;
    padding: 1px 10px;
    border-width: 2px;
    font-size: 20px;
    line-height: 1.3;
    white-space: normal;
  }

  body.lang-zh .category-secondary .subcategory-pill {
    min-height: 34px;
    padding: 1px 10px 3px;
  }

  .category-area.child-selected .category-primary {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1.3;
    overflow: visible;
  }

  .category-union-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .category-union-line {
    position: relative;
    z-index: var(--line-layer);
    display: block;
    width: fit-content;
    max-width: 100%;
    min-height: 42px;
    padding: 3px 13px;
    border: 2.25px solid var(--gray);
    border-radius: 999px;
    background: #fff;
    line-height: 1.3;
    white-space: nowrap;
  }

  .category-union-line + .category-union-line { margin-top: -10.8px; }
  .category-union-line button { white-space: nowrap; }
  body.has-category .category-area.union-multiline + .project-grid { margin-top: 22px; }

  .bio-toggle {
    top: -5px;
    width: 22px;
    height: 22px;
  }

  .bio-toggle::before,
  .bio-toggle::after {
    top: calc(50% - 1.2px);
    height: 2.4px;
  }
  body.bio-expanded .bio-extended { position: relative; top: -4px; }

  body.compact .content-layer,
  body.detail-open .content-layer { padding-top: 75px; }

  .project-detail {
    display: block;
    padding: 18px 0 56px;
  }

  .detail-media-square {
    width: calc(100% - 40px);
    height: auto;
    aspect-ratio: 1;
    margin: 0 20px;
  }

  .detail-media-wide { display: none; }
  .detail-meta { margin-top: 19px; font-size: 15px; line-height: 1; }
  .detail-description { margin-top: 21px; font-size: 15px; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Page 2 portfolio layouts */
img,
iframe {
  max-width: 100%;
}

figure {
  margin: 0;
}

.project-card:focus-visible,
.detail-accordion-toggle:focus-visible,
.detail-resource a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.project-meta {
  white-space: pre-line;
}

.project-detail {
  display: block;
  min-width: 0;
  padding: 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: 600px minmax(0, 963px);
  gap: 41px;
  margin-top: 29px;
  padding: 0 38px;
}

.detail-cover {
  width: 600px;
  max-width: 100%;
  height: 599px;
  overflow: hidden;
  background: #fff;
}

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

.detail-copy {
  min-width: 0;
}

.detail-meta {
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  white-space: pre-line;
}

.detail-summary-shell {
  position: relative;
  max-height: 410px;
  margin-top: 62px;
}

.detail-summary {
  max-height: 410px;
  overflow-y: auto;
  color: var(--ink);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.detail-summary::-webkit-scrollbar {
  display: none;
}

.detail-summary-shell::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 58px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgb(255 255 255 / 0%), rgb(255 255 255 / 96%));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: linear-gradient(180deg, transparent, #000);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000);
  transition: opacity 200ms ease;
}

.detail-summary-shell.is-overflowing::after {
  opacity: 1;
}

.detail-body {
  width: min(1270px, calc(100% - 76px));
  margin: 46px 38px 88px;
  color: var(--ink);
}

.detail-accordion {
  margin: 0 0 25px;
}

.detail-accordion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
}

.detail-plus {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  transform: rotate(0deg);
  transition: transform 350ms var(--ease-menu);
}

.detail-plus::before,
.detail-plus::after {
  content: "";
  position: absolute;
  top: calc(50% - 1.5px);
  left: 0;
  width: 100%;
  height: 3px;
  background: currentColor;
}

.detail-plus::after {
  transform: rotate(90deg);
}

.detail-accordion.is-open .detail-plus {
  transform: rotate(45deg);
}

.detail-accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 600ms var(--ease-reveal);
}

.detail-accordion.is-open .detail-accordion-panel {
  grid-template-rows: 1fr;
}

.detail-accordion-inner {
  min-height: 0;
  overflow: hidden;
}

.detail-body-copy {
  padding-top: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
}

body.lang-zh .detail-summary,
body.lang-zh .detail-body-copy {
  font-weight: 400;
}

.detail-resource {
  margin: 23px 0 32px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
}

.detail-resource a {
  color: var(--ink);
  text-decoration-thickness: var(--underline-thickness);
  text-underline-offset: 3px;
}

body.lang-zh .detail-resource a {
  text-underline-offset: 6px;
}

.detail-media-group,
.strips-layout,
.detail-embed,
.detail-paired {
  margin-top: 31px;
}

.media-row {
  display: grid;
  grid-template-columns: repeat(var(--media-columns), minmax(0, 1fr));
  align-items: start;
  min-width: 0;
}

.detail-media-group.has-gap .media-row {
  gap: 24px;
}

.detail-media-group .media-row + .media-row {
  margin-top: 24px;
}

.detail-media-group.no-gap .media-row + .media-row {
  margin-top: 0;
}

.media-row img,
.media-strip img,
.paired-image img {
  display: block;
  width: 100%;
  height: auto;
}

.strips-layout {
  max-width: 1064px;
  margin-left: 56px;
}

.media-strip {
  display: flex;
  gap: 24px;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.media-strip::-webkit-scrollbar {
  display: none;
}

.media-strip + .media-strip {
  margin-top: 24px;
}

.media-strip figure {
  flex: 0 0 242px;
  scroll-snap-align: start;
}

.project-detail[data-project="project-06"] .media-strip figure {
  flex-basis: 300px;
}

.detail-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: var(--embed-ratio);
  overflow: hidden;
  background: #f1f1f1;
}

.detail-embed.has-fixed-height {
  height: var(--embed-height);
  padding-bottom: 0;
}

.detail-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-paired {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.detail-paired > .detail-embed {
  margin-top: 0;
}

@media (min-width: 769px) {
  .project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 26px;
    row-gap: 29px;
  }

  .project-media {
    aspect-ratio: 1;
  }

  .project-meta {
    min-height: 131px;
    padding-top: 12px;
  }

  .project-detail[data-project="project-07"] .detail-body,
  .project-detail[data-project="project-17"] .detail-body,
  .project-detail[data-project="project-18"] .detail-body {
    width: min(1270px, calc(100% - 76px));
  }

  @media (hover: hover) and (pointer: fine) {
    .detail-accordion-toggle:hover,
    .detail-resource a:hover,
    .detail-meta:hover,
    .detail-summary:hover,
    .detail-body-copy:hover {
      color: var(--gray);
    }
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 314px minmax(0, 1fr);
    gap: 24px;
    padding: 0 20px;
  }

  .detail-cover {
    width: 314px;
    height: 314px;
  }

  .detail-summary-shell,
  .detail-summary {
    max-height: 200px;
  }

  .detail-summary-shell {
    margin-top: 25px;
  }

  .detail-body {
    width: calc(100% - 40px);
    margin-right: 20px;
    margin-left: 20px;
  }
}

@media (max-width: 768px) {
  .project-meta {
    white-space: pre-line;
  }

  .project-detail {
    display: flow-root;
    padding: 0 0 56px;
  }

  .detail-hero {
    display: block;
    margin-top: 25px;
    padding: 0;
  }

  .detail-cover {
    width: calc(100% - 40px);
    height: auto;
    aspect-ratio: 1;
    margin: 0 20px;
  }

  .detail-meta {
    width: calc(100% - 40px);
    min-height: 75px;
    margin: 22px 20px 0;
    font-size: 15px;
    line-height: 1;
  }

  .detail-summary-shell {
    width: calc(100% - 40px);
    height: 165px;
    max-height: 165px;
    margin: 21px 20px 0;
  }

  .detail-summary {
    height: 165px;
    max-height: 165px;
    font-size: 15px;
    line-height: 1.3;
  }

  .detail-summary-shell::after {
    height: 39px;
  }

  .detail-body {
    width: auto;
    margin: 22px 20px 56px;
  }

  .detail-accordion {
    margin-bottom: 22px;
  }

  .detail-accordion-toggle {
    gap: 9px;
    font-size: 24px;
    line-height: 1.3;
  }

  .detail-plus {
    width: 21px;
    height: 21px;
  }

  .detail-plus::before,
  .detail-plus::after {
    top: calc(50% - 1.2px);
    height: 2.4px;
  }

  .detail-body-copy {
    padding-top: 6px;
    font-size: 15px;
    line-height: 1.3;
  }

  .detail-resource {
    margin: 19px 0 27px;
    font-size: 24px;
  }

  .detail-media-group,
  .strips-layout,
  .detail-embed,
  .detail-paired {
    width: calc(100% + 40px);
    margin-top: 24px;
    margin-left: -20px;
  }

  .detail-accordion-inner > .detail-media-group,
  .detail-accordion-inner > .strips-layout,
  .detail-accordion-inner > .detail-embed,
  .detail-accordion-inner > .detail-paired {
    width: calc(100% + 40px);
  }

  .detail-media-group.has-gap .media-row,
  .detail-paired {
    gap: 14px;
  }

  .detail-media-group .media-row + .media-row,
  .media-strip + .media-strip {
    margin-top: 14px;
  }

  .detail-media-group.mobile-single .media-row,
  .project-detail[data-project="project-20"] .media-row,
  .detail-paired {
    grid-template-columns: 1fr;
  }

  .detail-media-group.mobile-single .media-row {
    gap: 14px;
  }

  .media-strip {
    gap: 14px;
    padding: 0;
  }

  .media-strip figure {
    flex-basis: 215px;
  }

  .project-detail[data-project="project-06"] .media-strip figure {
    flex-basis: 225px;
  }

  .detail-paired > .detail-embed,
  .detail-paired > .paired-image {
    width: 100%;
    margin: 0;
  }

  body.lang-zh .detail-summary,
  body.lang-zh .detail-body-copy {
    font-weight: 400;
  }
}

/* Requested desktop spacing, typography, and project-specific media sizing */
@media (min-width: 769px) {
  body:not(.compact):not(.has-category) .project-grid {
    margin-top: 93px;
  }

  body.bio-expanded:not(.compact):not(.has-category) .project-grid {
    margin-top: 117px;
  }

  .project-grid {
    row-gap: 35px;
  }

  .project-meta {
    padding-top: 18px;
    font-size: 18px;
  }

  .project-detail:is(
    [data-project="project-12"],
    [data-project="project-13"],
    [data-project="project-14"],
    [data-project="project-15"],
    [data-project="project-20"]
  ) .detail-media-group {
    width: 70%;
  }
}

.detail-summary,
.detail-body-copy {
  font-weight: 400;
}

.project-detail[data-project="project-20"] .detail-media-group.no-gap .media-row,
.project-detail[data-project="project-20"] .detail-media-group.no-gap .media-row + .media-row {
  gap: 0;
  margin-top: 0;
}

@media (hover: hover) and (pointer: fine) {
  .project-detail .detail-meta:hover,
  .project-detail .detail-summary:hover,
  .project-detail .detail-body-copy:hover {
    color: var(--ink);
  }

  body.detail-open .home-link:hover,
  body.detail-open .category-area button:hover,
  body.detail-open .category-primary:hover {
    color: var(--ink);
  }

  body.detail-open .category-area.child-selected .category-primary:hover {
    color: var(--gray);
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-plus,
  .detail-accordion-panel,
  .detail-summary-shell::after {
    transition-duration: 0.01ms !important;
  }
}
