@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+TC:wght@400;500;600;700;900&display=swap');

:root {
  --ink: #161b1e;
  --paper: #f8f8f5;
  --line: #c7c9c5;
  --muted: #596369;
  --hero-border: 1px solid #dbdcd8;
  --hero-height: 300px;
  --hero-padding: 60px 42px;
  --hero-eyebrow-size: 12px;
  --hero-eyebrow-height: 12px;
  --hero-eyebrow-tracking: 1.5px;
  --hero-title-gap: 24px;
  --hero-title-width: 1000px;
  --hero-title-height: 166px;
  --hero-title-size: clamp(72px, 6vw, 88px);
  --hero-title-line: .94;
  --hero-title-tracking: -.02em;
  --hero-title-weight: 900;
  --hero-description-width: 365px;
  --hero-description-height: 62px;
  --hero-description-right: 190px;
  --hero-description-bottom: 62px;
  --hero-description-size: 16px;
  --hero-description-leading: 1.65;
  --project-title-size: clamp(36px, 4.5vw, 64px);
  --project-title-gap: 23px;
  --project-cover-small-max: 580px;
  --project-cover-max: 638px;
  --card-column-gap: 38px;
  --card-vertical-gap: 34px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, 'Noto Sans TC', sans-serif;
  font-size: 14px
}

.site-header,
main,
footer {
  max-width: 1420px;
  margin: auto
}

.site-header {
  height: 104px;
  border-bottom: var(--hero-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0
}

.brand {
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1.6px;
  color: inherit;
  text-decoration: none
}

.brand sup {
  font-size: 8px;
  vertical-align: top;
  margin-left: 1px
}

.site-header nav {
  display: flex;
  gap: 42px
}

.site-header nav a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  position: relative
}

.site-header nav a:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: .25s
}

.site-header nav a:hover:after,
.site-header nav .active:after {
  width: 100%
}

/* One visual template shared by Home, Work and About. */
.page-hero {
  position: relative;
  height: var(--hero-height);
  padding: var(--hero-padding);
  border-bottom: var(--hero-border)
}

.page-hero__eyebrow {
  height: var(--hero-eyebrow-height);
  font-size: var(--hero-eyebrow-size);
  line-height: 1;
  letter-spacing: var(--hero-eyebrow-tracking);
  font-weight: 700;
  color: #66757b;
  margin: 0;
  white-space: nowrap
}

.page-hero__title-container {
  width: min(100%, var(--hero-title-width));
  height: var(--hero-title-height);
  margin-top: var(--hero-title-gap)
}

.page-hero__title {
  font-size: var(--hero-title-size);
  letter-spacing: var(--hero-title-tracking);
  line-height: var(--hero-title-line);
  margin: 0;
  font-weight: var(--hero-title-weight);
  white-space: nowrap
}

.page-hero__description {
  position: absolute;
  width: var(--hero-description-width);
  height: var(--hero-description-height);
  right: var(--hero-description-right);
  bottom: var(--hero-description-bottom);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: var(--hero-description-size);
  line-height: var(--hero-description-leading)
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #66757b;
  margin: 0
}

.contact em {
  font-style: normal
}

.folio {
  position: absolute;
  top: 60px;
  right: 9px;
  margin: 0;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px
}

/* Project hero is a single data-driven template with a smaller title scale. */
.project-hero {
  padding: 58px 0 80px
}

.back {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px
}

.project-hero .eyebrow {
  margin-top: 90px
}

.project-hero h1 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: var(--project-title-size);
  letter-spacing: -.02em;
  margin: var(--project-title-gap) 0 65px;
  line-height: 1.1;
  font-weight: var(--hero-title-weight)
}

.featured,
.all-work {
  padding: 112px 0 150px
}

.section-head {
  border-top: 2px solid #9fa39f;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 45px
}

.section-head h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0
}

.section-head a,
.next a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px
}

.section-head span,
.next span {
  font-size: 14px;
  margin-left: 4px
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--card-column-gap);
  row-gap: var(--card-vertical-gap);
  align-items: start
}

.project-card {
  text-decoration: none;
  color: var(--ink);
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: enter .6s ease forwards;
  break-inside: avoid;
  width: 100%;
  margin: 0 0 var(--card-vertical-gap)
}

.work-grid .project-card {
  margin-bottom: 0
}

.project-card:nth-child(2n) {
  margin-top: 0
}

[data-page="home"] .project-card.portrait,
[data-page="work"] .project-card.portrait {
  width: 76%;
  margin-right: auto;
  margin-left: auto
}

.placeholder,
.project-cover {
  position: relative;
  background: var(--card);
  overflow: hidden;
  aspect-ratio: 1.28
}

.project-card__media {
  min-width: 0;
  min-height: 0
}

.project-card__image,
.project-cover__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%
}

.project-card .placeholder:has(.project-card__image) {
  aspect-ratio: auto;
}

.project-card__image {
  position: static;
  width: 100%;
  height: auto;
  object-fit: initial;
}

.project-cover__image {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: initial;
}

.project-cover:has(.project-cover__image) {
  aspect-ratio: auto;
  height: auto;
  background: transparent;
  overflow: visible;
}

img[data-protected-work-image] {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none
}

.portrait .placeholder {
  aspect-ratio: .74
}

.wide .placeholder {
  aspect-ratio: 1.78
}

.placeholder small,
.project-cover small {
  position: absolute;
  top: 22px;
  left: 22px;
  font: 10px Inter
}

.placeholder i,
.project-cover i {
  position: absolute;
  inset: 12% 12%;
  border: 1px solid rgba(255, 255, 255, .25)
}

.placeholder b,
.project-cover b {
  position: absolute;
  right: 20px;
  bottom: 18px;
  text-align: right;
  font-size: 9px;
  letter-spacing: 1px;
  line-height: 1.2
}

.card-info {
  border-top: 1px solid #6e7472;
  margin-top: 12px;
  padding-top: 12px;
  position: relative
}

.card-info strong {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 18px;
  font-weight: 500
}

.card-info span {
  position: absolute;
  right: 0;
  font-size: 22px;
  top: 6px
}

.card-info p {
  font-size: 12px;
  color: #606868;
  margin: 9px 0 0
}

.project-card--text {
  width: 100% !important
}

.project-card--text .card-info {
  margin-top: 0;
  padding: 20px 0
}

.project-card:hover .placeholder {
  filter: brightness(.94)
}

@keyframes enter {
  to {
    opacity: 1;
    transform: none
  }
}

footer {
  border-top: 1px solid #a8aca8;
  padding: 24px 0 38px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .2px
}

.filter-row {
  border-top: 2px solid #9fa39f;
  padding: 18px 0 40px;
  display: flex;
  gap: 60px
}

.filter-row>span {
  font-size: 13px
}

.filter-row div {
  display: flex;
  gap: 28px;
  flex-wrap: wrap
}

.filter-row button {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: #707775;
  cursor: pointer
}

.filter-row button.selected {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px
}

.about-detail {
  padding: 110px 0 60px;
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 600px);
  justify-content: center;
  align-items: center;
  gap: 64px
}

.about-introduction>p:last-child {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 24px;
  line-height: 1.7;
  max-width: 590px;
  margin: 42px 0 0
}

.about-introduction {
  justify-self: end
}

.about-avatar {
  width: clamp(220px, 18vw, 270px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, .58)
}

.about-motion {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center
}

.about-profile {
  margin: 0
}

.about-profile>div {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  display: grid;
  grid-template-columns: 125px 1fr
}

.about-profile dt {
  color: #66706e
}

.about-profile dd {
  font-family: 'Noto Sans TC', sans-serif;
  margin: 0;
  line-height: 1.7
}

.tool-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px
}

.tool-list img {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain
}

.contact {
  border-top: none;
  padding: 0 0 50px;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

.contact-link {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-placeholder {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 18px;
  margin: 0
}

.project-cover {
  aspect-ratio: 1.77;
  width: 52%;
  max-width: var(--project-cover-max);
  margin-left: auto;
  margin-right: auto;
}

.project-cover--small {
  width: 48%;
  max-width: var(--project-cover-small-max)
}

.project-cover--medium {
  width: 52%;
  max-width: var(--project-cover-max)
}

.project-cover--large {
  width: 52%;
  max-width: var(--project-cover-max)
}

.project-cover.portrait {
  aspect-ratio: 1.18
}

.project-hero-media {
  width: 68%;
  max-width: 900px;
  margin-right: auto;
  margin-left: auto
}

.project-hero-media__video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain
}

.project-info {
  padding: 90px 0 150px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12%
}

.project-copy {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  grid-column: 1
}

.project-info>dl {
  grid-column: 2
}

.project-info dl {
  margin: 0
}

.project-info dl div {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  display: grid;
  grid-template-columns: 145px 1fr
}

.project-info dt {
  color: #66706e
}

.project-info dd {
  font-family: 'Noto Sans TC', sans-serif;
  margin: 0
}

.project-outcome-link {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity .2s ease
}

.project-outcome-link:hover {
  opacity: .65
}

.project-gallery {
  display: grid;
  gap: 56px;
  width: 100%;
  padding: 0 0 150px
}

.project-gallery__item {
  display: flex;
  width: 100%;
  justify-content: center
}

.project-gallery__media,
.project-gallery__image {
  display: block;
  width: auto;
  max-width: 76%;
  max-height: min(82vh, 900px);
  height: auto;
  margin-right: auto;
  margin-left: auto;
  object-fit: contain
}

.project-gallery__item.is-portrait .project-gallery__media {
  max-width: 52%;
  max-height: min(76vh, 760px)
}

.project-gallery__item.is-square .project-gallery__media {
  max-width: 64%;
  max-height: min(78vh, 820px)
}

.project-gallery__item.is-landscape .project-gallery__media {
  max-width: 76%
}

.project-gallery__item.is-wide .project-gallery__media {
  max-width: 82%
}

.project-gallery--carousel {
  display: block;
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto
}

.project-carousel__slide[hidden] {
  display: none
}

.project-carousel__controls {
  width: 82%;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center
}

.project-carousel__controls button {
  width: fit-content;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 2px 0 4px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer
}

.project-carousel__controls button:last-child {
  justify-self: end
}

.project-carousel__count {
  margin: 0;
  color: var(--muted);
  font-size: 12px
}

.project-gallery--masonry {
  display: block;
  max-width: 1320px;
  margin-right: auto;
  margin-left: auto;
  column-count: 3;
  column-width: 380px;
  column-gap: 16px
}

.project-gallery--masonry .project-gallery__item {
  display: block;
  break-inside: avoid;
  margin-bottom: 16px
}

.project-gallery--masonry .project-gallery__media {
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0
}

.project-hero>.project-gallery--masonry {
  padding-bottom: 0
}

.project-gallery-groups {
  display: grid;
  gap: 72px;
  width: 100%;
  padding: 0 0 150px
}

.project-gallery-groups>.project-gallery {
  padding-bottom: 0
}

.project-gallery--flow {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto
}

.project-gallery--flow .project-gallery__item {
  min-width: 0;
  align-self: start
}

.project-gallery--flow .project-gallery__media {
  width: 100%;
  max-width: 650px;
  max-height: 650px
}

.project-gallery--flow .project-gallery__item.is-portrait .project-gallery__media {
  max-width: 460px;
  max-height: 650px
}

.project-gallery--flow .project-gallery__item.is-wide {
  grid-column: 1 / -1
}

.project-gallery--flow .project-gallery__item.is-wide .project-gallery__media {
  width: 82%;
  max-width: 980px;
  max-height: 650px
}

.next {
  border-top: 1px solid var(--ink);
  padding: 20px 0 100px;
  text-align: right
}

.next a {
  font-size: 16px
}

@media(max-width:1480px) {

  .site-header,
  main,
  footer {
    max-width: none;
    margin: 0 50px
  }
}

@media(max-width:1000px) {
  .project-gallery--masonry {
    column-count: 2;
    column-width: auto
  }

  .project-gallery--flow {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px
  }
}

@media(max-width:720px) {
  :root {
    --hero-height: 400px;
    --hero-padding: 48px 32px;
    --hero-eyebrow-size: 10px;
    --hero-eyebrow-height: 10px;
    --hero-eyebrow-tracking: 1.1px;
    --hero-title-gap: 18px;
    --hero-title-width: 100%;
    --hero-title-height: 94px;
    --hero-title-size: clamp(34px, 9.5vw, 42px);
    --hero-title-line: .96;
    --hero-title-tracking: -.045em;
    --hero-description-width: 290px;
    --hero-description-height: 64px;
    --hero-description-right: auto;
    --hero-description-bottom: 32px;
    --hero-description-size: 15px;
    --project-title-size: 43px;
    --project-title-gap: 23px;
    --card-column-gap: 0;
    --card-vertical-gap: 32px
  }

  .site-header,
  main,
  footer {
    margin: 0 20px
  }

  .site-header {
    height: 73px
  }

  .brand {
    font-size: 23px
  }

  .site-header nav {
    gap: 20px
  }

  .site-header nav a {
    font-size: 12px
  }

  .folio {
    top: 48px;
    right: 0
  }

  .page-hero__description {
    left: 32px
  }

  .featured,
  .all-work {
    padding: 64px 0 85px
  }

  .section-head {
    margin-bottom: 28px
  }

  .work-grid {
    grid-template-columns: 1fr;
    column-gap: var(--card-column-gap)
  }

  .project-card:nth-child(2n) {
    margin-top: 0
  }

  .project-card:nth-child(3n) {
    width: 100%;
    margin-left: 0
  }

  [data-page="home"] .project-card.portrait,
  [data-page="work"] .project-card.portrait {
    width: 100%;
    margin-right: 0;
    margin-left: 0
  }

  .card-info strong {
    font-size: 16px
  }

  .filter-row {
    display: block;
    padding-bottom: 32px
  }

  .filter-row>span {
    display: block;
    margin-bottom: 18px
  }

  .filter-row div {
    gap: 13px 20px
  }

  .about-detail {
    padding: 70px 0 95px;
    display: block
  }

  .about-introduction {
    justify-self: auto
  }

  .about-introduction>p:last-child {
    font-size: 20px;
    margin-top: 36px
  }

  .about-avatar {
    width: clamp(140px, 42vw, 180px);
    margin-right: auto;
    margin-left: auto
  }

  .about-profile {
    margin-top: 56px
  }

  .about-profile>div {
    grid-template-columns: 100px 1fr
  }

  .contact {
    padding-bottom: 80px
  }

  .contact h2 {
    font-size: 58px;
    margin: 36px 0 55px
  }

  .contact-placeholder {
    font-size: 16px
  }

  .project-hero {
    padding: 42px 0 55px
  }

  .project-hero .eyebrow {
    margin-top: 65px
  }

  .project-hero h1 {
    margin-bottom: 35px
  }

  .project-cover {
    aspect-ratio: 1.18
  }

  .project-cover--small,
  .project-cover--medium,
  .project-cover--large {
    width: 100%;
    max-width: none
  }

  .project-hero-media {
    width: 100%;
    max-width: none
  }

  .project-info {
    padding: 60px 0 90px;
    display: block
  }

  .project-copy {
    font-size: 21px;
    margin-bottom: 60px
  }

  .project-info dl div {
    grid-template-columns: 112px 1fr
  }

  .project-gallery {
    gap: 24px;
    padding-bottom: 90px
  }

  .project-gallery-groups {
    gap: 48px;
    padding-bottom: 90px
  }

  .project-gallery-groups>.project-gallery {
    padding-bottom: 0
  }

  .project-gallery__media,
  .project-gallery__image,
  .project-gallery__item.is-portrait .project-gallery__media,
  .project-gallery__item.is-square .project-gallery__media,
  .project-gallery__item.is-landscape .project-gallery__media,
  .project-gallery__item.is-wide .project-gallery__media {
    width: 100%;
    max-width: 100%;
    max-height: none
  }

  .project-carousel__controls {
    width: 100%;
    margin-top: 16px
  }

  .project-gallery--flow {
    grid-template-columns: 1fr;
    gap: 24px
  }

  .project-gallery--flow .project-gallery__media,
  .project-gallery--flow .project-gallery__item.is-portrait .project-gallery__media,
  .project-gallery--flow .project-gallery__item.is-wide .project-gallery__media {
    width: 100%;
    max-width: 100%;
    max-height: none
  }

  .project-gallery--flow .project-gallery__item.is-wide {
    grid-column: auto
  }

  .project-gallery--masonry {
    column-count: 1;
    column-gap: 16px
  }

  .project-gallery--masonry .project-gallery__item {
    margin-bottom: 16px
  }

  .next {
    padding-bottom: 70px
  }

  footer {
    display: grid;
    gap: 12px;
    padding: 20px 0 30px;
    font-size: 10px
  }

}
