/*
  Ava Ting — post-production / photography

  Type   Inter for names, navigation and copy. DM Mono for credits and metadata.
  Layout A black bar carries the two disciplines. Under it a centred header, then generous white.
         Pictures sit on a three-column grid; text keeps to a narrow centred measure.
*/
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("assets/fonts/DMMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --grey: #6a6a6a;          /* reading text, second lines */
  --quiet: #838383;         /* filters at rest */
  --orange: #b6431d;
  --ph: #f7f7f7;            /* behind a picture while it loads */
  --sans: "Inter", "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, "PingFang TC", "Noto Sans TC", monospace;
  --gap: .75rem;
  --bar: 3.2rem;            /* height of the black bar */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 1280px) { html { font-size: 14.4px; } }
@media (max-width: 700px) { html { font-size: 15px; } }

body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: .9375rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
main { flex: 1; }

/* the page fades in once its fonts are there */
.js body { opacity: 0; }
.js.ready body { opacity: 1; transition: opacity .5s ease; }

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 { margin: .8em 0; font: inherit; }
p { margin: .8em 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--ink); margin: 2rem 0; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 600; background: var(--paper); color: var(--ink); padding: .6rem 1rem; }
.skip:focus { top: .5rem; }

/* ---------- type ---------- */
.text-title { font-family: var(--sans); text-transform: uppercase; font-size: .9375rem; font-weight: 550; letter-spacing: .12em; }
.text-subtitle { font-family: var(--mono); text-transform: uppercase; font-size: .75rem; font-weight: 400; letter-spacing: .08em; }
.text-copy { font-size: .875rem; }

/* ---------- measure ---------- */
.capped { max-width: 1000px; padding: 0 1rem; margin: 0 auto; }
.capped.cb { box-sizing: content-box; max-width: 1440px; }
@media (min-width: 1281px) { .capped { padding: 0 6rem; } }

/* ---------- the black bar: the two disciplines ---------- */
.upper { position: sticky; top: 0; z-index: 500; padding-inline: clamp(.6rem, 2vw, 1.5rem); background: #000; color: #fff; }
.upper-inner {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) minmax(0, 968px) minmax(5.5rem, 1fr);
  align-items: center;
}
.upper-btns { position: relative; display: grid; grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upper-btns::before { content: ""; position: absolute; top: 50%; left: 50%; height: 1rem; border-right: 2px solid #fff; transform: translate(-50%, -50%); }
.upper-btns li { text-align: center; }
.upper-btns button { padding: 1rem; margin: 0 -1rem; line-height: 1.2rem; letter-spacing: 2px; white-space: nowrap; color: #8c8c8c; transition: color .3s ease; }
.upper-btns button.is-here, .upper-btns button:hover, .upper-btns button[aria-expanded="true"] { color: #fff; }
.dd-open .upper-btns button[aria-expanded="false"] { color: #666; }
.upper-btns button::after { content: "+"; display: inline-block; margin-left: .7em; font-weight: 300; transition: transform .45s ease; }
.upper-btns button[aria-expanded="true"]::after { transform: rotate(45deg); }
.lang {
  display: flex;
  grid-column: 3;
  justify-self: end;
  align-items: center;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .1em;
  white-space: nowrap;
}
.lang a { display: grid; place-items: center; min-width: 2rem; min-height: var(--bar); opacity: .55; transition: opacity .2s ease; }
.lang a.is-on, .lang a:hover, .lang a:focus-visible { opacity: 1; }
.lang span { margin: 0 .2rem; }
@media (min-width: 1000px) {
  .upper-btns li { text-align: left; }
  .upper-btns li:last-child { text-align: right; }
}
@media (max-width: 700px) {
  .upper-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
  .upper-btns { grid-column: 1; grid-template-columns: 1.2fr 1fr; }
  .upper-btns::before { left: 54.55%; height: .75rem; border-width: 1px; }
  .upper-btns button { padding-inline: .15rem; margin: 0; font-size: .8rem; letter-spacing: .08em; }
  .upper-btns button::after { margin-left: .5em; }
  .lang { grid-column: 2; font-size: .75rem; letter-spacing: .06em; }
  .lang a { min-width: 1.65rem; }
}
@media (max-width: 360px) {
  .upper-btns button { font-size: .73rem; }
}

/* Separate links to each discipline from the plus buttons for their indexes. */
.discipline-links .upper-btns li {
  display: flex;
  justify-content: center;
  align-items: center;
}
.discipline-links .upper-btns a {
  display: flex;
  align-items: center;
  min-height: var(--bar);
  border-bottom: 2px solid transparent;
  padding-top: 2px;
  color: #b5b5b5;
  letter-spacing: 2px;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.discipline-links .upper-btns button {
  display: grid;
  place-items: center;
  width: 2.2rem;
  flex: 0 0 2.2rem;
  min-height: var(--bar);
  padding: 0;
  margin: 0;
  color: #b5b5b5;
  letter-spacing: 0;
}
.discipline-links .upper-btns a:hover,
.discipline-links .upper-btns a[aria-current] { color: #fff; }
.discipline-links .upper-btns button::after { margin: 0; font-size: 1.2rem; }
.discipline-links .upper-btns button:hover,
.discipline-links .upper-btns button[aria-expanded="true"] { color: #fff; }
.discipline-links a:focus-visible,
.discipline-links button:focus-visible { outline-offset: -3px; }
@media (min-width: 1000px), (max-width: 700px) {
  .discipline-links .upper-btns li:first-child { justify-content: flex-start; }
  .discipline-links .upper-btns li:last-child { justify-content: flex-end; }
}
@media (max-width: 700px) {
  .discipline-links .upper-btns a { font-size: .8rem; letter-spacing: .08em; }
  .discipline-links .upper-btns button { width: 1.9rem; flex-basis: 1.9rem; }
}
@media (max-width: 360px) {
  .discipline-links .upper-btns a { font-size: .66rem; letter-spacing: .035em; }
  .discipline-links .upper-btns button { width: 1.65rem; flex-basis: 1.65rem; }
}

/* the index behind each label: a full black sheet of names */
.dd {
  position: fixed; inset: 0; z-index: 200; height: 0; overflow: hidden; visibility: hidden;
  background: #000; color: #fff; text-align: center; font-size: 1.125rem;
  transition: height .75s ease, visibility 0s .75s;
}
.dd-open { overflow: hidden; }
.dd-open .dd { height: 100vh; height: 100dvh; overflow: auto; visibility: visible; transition: height .75s ease, visibility 0s; }
.dd.is-front { z-index: 201; }
.dd-in { padding: calc(var(--bar) + 4.5rem) 0 6rem; opacity: 0; visibility: hidden; transform: translateY(-40px); transition: opacity .2s ease, transform .45s ease, visibility 0s .45s; }
.dd.is-front .dd-in { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease .3s, transform .45s ease .3s, visibility 0s; }
.dd h4 { margin: 0; }
.dd .et { display: inline-block; margin: .625rem 0 3rem; color: #999; text-decoration: underline; font-size: .9375rem; }
.dd h5 { margin: 2.5rem 0 .6rem; color: #999; }
.dd h5:first-of-type { margin-top: 0; }
.dd ul { margin: 0 auto; }
.dd li { display: inline-block; margin: .5rem 0; white-space: nowrap; }
.dd li::after { content: "."; display: inline-block; margin: 0 .625rem; }
.dd li:last-child::after { content: none; }
.dd a { transition: opacity .2s ease; }
.dd a:hover { opacity: .6; }
@media (min-width: 760px) { .dd ul { max-width: 660px; } }
@media (min-width: 1281px) { .dd ul { max-width: 725px; } }
@media (max-width: 700px) {
  .dd-in { padding-top: calc(var(--bar) + 3rem); }
  .dd li { display: block; white-space: normal; margin: .95rem 1.5rem; }
  .dd li::after { content: none; }
}

/* ---------- header ---------- */
.lower { padding: 1.5rem 0; }
.main-menu { display: flex; align-items: center; }
.main-menu li { flex: 1; }
.main-menu .logo-cell { flex: none; text-align: center; }
.main-menu .logo-cell ~ li { text-align: right; }
.main-menu a { display: inline-block; padding: 1rem; margin: 0 -1rem; transition: opacity .2s ease; }
.main-menu a:hover { opacity: .55; }
.logo { font-family: var(--sans); font-weight: 650; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -.055em; text-transform: none; white-space: nowrap; }
.main-menu a.logo:hover { opacity: 1; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
@media (max-width: 700px) {
  .lower { padding: 1.1rem 0 .2rem; }
  .main-menu { flex-wrap: wrap; justify-content: space-between; font-size: .8125rem; letter-spacing: 2px; }
  .main-menu li { flex: none; }
  .main-menu .logo-cell { order: -1; flex: 0 0 100%; }
  .main-menu .logo-cell ~ li { text-align: left; }
  .main-menu a { padding: .9rem .6rem; margin: 0 -.6rem; }
  .main-menu a.logo { padding: .7rem 1rem .5rem; margin: 0; }
}

/* ---------- filters ---------- */
.page-title { text-align: center; margin: 0 0 .75rem; }
.tags { padding: 0 2rem .75rem; color: var(--quiet); text-align: center; }
.tags li { display: inline-block; }
.tags li::after { content: "."; display: inline-block; margin: 0 .625rem; }
.tags li:last-child::after { content: none; }
.tags a { transition: color .2s ease; }
.tags a:hover, .tags .active { color: var(--orange); }
.tags .active { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
@media (max-width: 500px) {
  .tags { padding: 0 0 .5rem; }
  .tags li { margin: 0 6px; }
  .tags li::after { content: none; }
  .tags a { display: inline-block; padding: .3rem 0; }
}

/* ---------- grid and tiles ---------- */
.grid { display: flex; align-items: flex-start; gap: var(--gap); }
.grid .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.work { padding-bottom: 4rem; }

.tile { display: block; position: relative; }
.ph { display: block; position: relative; overflow: hidden; background: var(--ph); }
.ph::before { content: ""; display: block; padding-top: calc(100% / var(--ar, 1.5)); }
.ph > img, .ph > video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.ph > img { opacity: 0; transition: opacity .35s ease; }
.ph > img.in { opacity: 1; }
.overlay { display: block; padding: .75rem 0; }
.overlay .text-title, .overlay .text-subtitle { display: block; margin: 0; line-height: 1.3125rem; }
.overlay .text-subtitle { color: var(--grey); }
@media (any-hover: hover) {
  .overlay {
    position: absolute; inset: 0; padding: 2rem; display: flex; align-items: center; justify-content: center; text-align: center;
    background: rgba(0, 0, 0, .8); color: #fff; opacity: 0; transition: opacity .5s ease;
  }
  .overlay .text-subtitle { color: inherit; margin-top: .35rem; }
  .tile:hover .overlay, .tile:focus-visible .overlay { opacity: 1; }
}

/* ---------- home: the slideshow ---------- */
body.is-home { height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.is-home .lower { position: absolute; top: var(--bar); left: 0; right: 0; z-index: 5; color: #fff; pointer-events: none; }
.is-home .lower a { pointer-events: auto; }
.hero { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; color: #fff; touch-action: pan-y; }
.slide { position: absolute; inset: 0; display: block; visibility: hidden; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.slide.is-on, .slide.is-moving { visibility: visible; }
.slide-media { position: absolute; inset: 0; display: flex; }
.slide-media.is-col { flex-direction: column; }
.slide-media > * { flex: 1 1 0; min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-media > img { opacity: 0; transition: opacity .6s ease; object-position: 50% 32%; }      /* a crop keeps the upper part, where faces are */
.slide-media > img.in { opacity: 1; }
.slide.is-contain .slide-media > * { object-fit: contain; }
.slide::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); pointer-events: none; }
.slide.is-contain::after { content: none; }
.slide-titles {
  position: absolute; left: 0; right: 0; top: 50%; z-index: 2; padding: 0 4rem; text-align: center;
  transform: translate3d(var(--tx, 0), -50%, 0); text-shadow: 0 0 2rem rgba(0, 0, 0, .35);
}
/* a wide film on an upright screen: a band across the middle with its title underneath */
.slide.is-strip .slide-media { top: calc(50% - 2.75rem); bottom: auto; height: var(--mh, 30vh); transform: translateY(-50%); }
.slide.is-strip .slide-media > * { object-fit: cover; }
.slide.is-strip .slide-titles { top: calc(50% - 2.75rem + var(--mh, 30vh) / 2 + 1.5rem); transform: translate3d(var(--tx, 0), 0, 0); }
.slide.is-strip.is-top-aligned .slide-media { top: 0; transform: none; }
.slide.is-strip.is-top-aligned .slide-titles { top: calc(var(--mh, 30vh) + 1.5rem); }
.slide-title { font-family: var(--sans); text-transform: uppercase; font-size: 3rem; font-weight: 500; letter-spacing: 4px; line-height: 1.08; margin: 0; }
.slide-subtitle { font-family: var(--sans); text-transform: uppercase; font-size: 2rem; font-weight: 300; letter-spacing: 3px; line-height: 1.1; margin: 10px 0 0; }
.hero-arrow {
  position: absolute; top: 50%; z-index: 4; width: 5rem; height: 9rem; margin-top: -4.5rem;
  font-family: var(--sans); font-weight: 500; font-size: 2.25rem; color: #fff; transition: opacity .2s ease;
}
.hero-arrow:hover { opacity: .55; }
.hero-arrow.prev { left: 0; }
.hero-arrow.next { right: 0; }
@media (max-width: 700px) {
  .slide-titles { padding: 0 1.5rem; }
  .slide-title { font-size: 2rem; letter-spacing: 3px; }
  .slide-subtitle { font-size: 1.2rem; letter-spacing: 2px; }
  .hero-arrow { display: none; }
}

/* ---------- a project ---------- */
.project { padding-bottom: 4rem; }
.project-top { text-align: center; }
.project-top .page-title { margin-bottom: .35rem; }
.project-top p { margin: 0 0 .75rem; color: var(--quiet); }

.fit { position: relative; margin: 0 auto; background: #000; width: min(100%, calc(80vh * var(--ar, 1.7778))); }
.fit::before { content: ""; display: block; padding-top: calc(100% / var(--ar, 1.7778)); }
.fit > video, .fit > iframe, .fit > .yt { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 5rem; height: 5rem; margin: -2.5rem 0 0 -2.5rem; border: 1px solid #fff; border-radius: 50%;
  background: rgba(0, 0, 0, .25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.5 7v10l8-5z'/%3E%3C/svg%3E") center / 2rem no-repeat;
  transition: background-color .3s ease;
}
.yt:hover::after { background-color: rgba(0, 0, 0, .6); }

.project-info .text-title { margin: 0; }
.project-info h1.text-title {
  margin-top: 1.5rem; font-size: clamp(1.25rem, 2.15vw, 2rem);
  font-weight: 650; line-height: 1.18; letter-spacing: -.035em; text-transform: none;
}
.project-info h2.text-title {
  margin: .5rem 0 1.5em; color: var(--grey);
  font-family: var(--mono); font-weight: 400; font-size: .78rem; letter-spacing: .09em;
}
.project-info p { color: var(--grey); }
.project-info p:last-child { margin-bottom: 0; }
.profile-link { display: inline-block; margin-top: 1.375rem; color: var(--grey); text-decoration: underline; }
@media (min-width: 1000px) { .project-info { max-width: 50%; } }

.gallery { display: flex; flex-direction: column; align-items: center; gap: var(--gap); }
.g-row { display: flex; gap: var(--gap); width: min(100%, calc(86vh * var(--a, 1.5))); }
.g-row figure { position: relative; margin: 0; flex: var(--fa, 1.5) 1 0; min-width: 0; background: var(--ph); }
.g-row figure::before { content: ""; display: block; padding-top: calc(100% / var(--fa, 1.5)); }
.g-row img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.g-row img.in { opacity: 1; }
@media (max-width: 700px) {
  .g-row { flex-direction: column; width: 100%; }
  .g-row figure { flex: none; }
}

.stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 3rem; }
.stills img { width: 100%; height: auto; background: var(--ph); }
@media (max-width: 700px) { .stills { grid-template-columns: 1fr; } }

.breakdown { max-width: 940px; margin: clamp(3rem, 6vw, 5rem) auto 0; }
.breakdown h2 { margin: 0 0 1rem; }
.breakdown-layout { display: grid; grid-template-columns: minmax(0, .64fr) minmax(0, 1fr); align-items: start; gap: var(--gap); }
.breakdown .fit { width: 100%; }
.breakdown .stills { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.breakdown .stills img:first-child { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .breakdown-layout { grid-template-columns: 1fr; }
  .breakdown .fit { width: min(100%, 24rem); }
}

.pager { padding: 3rem 0 0; }
.bordered-title { display: block; position: relative; text-align: center; margin: 1.5rem 0; }
.bordered-title::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; border-top: 1px solid var(--ink); margin-top: -1px; }
.bordered-title a, .bordered-title span { position: relative; padding: 0 1rem; background: var(--paper); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.more-grid .tile:nth-child(4) { display: none; }
@media (max-width: 768px) {
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-grid .tile:nth-child(4) { display: block; }
}
@media (max-width: 500px) {
  .more-grid { grid-template-columns: 1fr; }
  .more-grid .tile:nth-child(4) { display: none; }
}

/* ---------- about, contact ---------- */
/* these two pages carry both languages; only the one in use shows */
html[lang="en"] main [lang="zh-Hant"], html[lang="zh-Hant"] main [lang="en"] { display: none; }

.about-intro { margin: 1.5rem 0 0; text-align: center; text-align-last: center; font-family: var(--sans); font-size: 1.08rem; color: var(--grey); }

.page-wrap { max-width: 41.25rem; margin: 0 auto; padding: 0 2rem 4rem; text-align: justify; text-align-last: center; }
.page-wrap .text-title { margin: 1.5em 0; text-align: center; }
.page-wrap .copy { color: var(--grey); }
.page-wrap .copy p { text-wrap: pretty; }
.page-wrap .copy a { text-decoration: underline; }
.page-wrap h2.text-title { margin: 2.5em 0 .6em; }
.dots { color: var(--grey); text-align: center; text-align-last: center; }
.dots li { display: inline-block; }
.dots li::after { content: "."; display: inline-block; margin: 0 .625rem; }
.dots li:last-child::after { content: none; }
@media (max-width: 500px) { .page-wrap { padding: 0 .5rem 3rem; } }

.contact-cards { padding: 1.5rem 0 4rem; }
.contact-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.contact-head .text-title { margin: 1.5em 0 0; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--gap); padding-top: 1.5rem; }
.cards h2, .cards h3 { font-family: var(--sans); font-size: .9375rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 1.125rem; }
.cards p { margin: 0 0 2rem; overflow: hidden; text-overflow: ellipsis; }
.cards a { text-decoration: underline; }
@media (max-width: 768px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .cards { grid-template-columns: 1fr; } }

.lost { padding: 6rem 1rem; text-align: center; }
.lost a { text-decoration: underline; color: var(--grey); }

/* ---------- footer ---------- */
.foot {
  --footer-orange: #ff5c40;
  border-top: 1px solid var(--ink);
  background: var(--footer-orange);
  color: var(--ink);
}
.foot-inner {
  max-width: 1600px;
  margin-inline: auto;
  padding: clamp(2.25rem, 5.8vw, 6rem) clamp(1.25rem, 4.5vw, 5rem) 1.05rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, .75fr) minmax(0, 1fr);
  column-gap: clamp(1rem, 4vw, 4rem);
  align-items: start;
}
.foot-name {
  margin: 0;
  font-size: clamp(3.5rem, 8.5vw, 8.5rem);
  font-weight: 780;
  line-height: .9;
  letter-spacing: -.082em;
}
.foot-label { font-weight: 650; margin: 0 0 .6rem; }
.foot-links { display: grid; gap: .25rem; }
.foot-links a { text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.foot-links a:hover { text-decoration-thickness: 2px; }
.foot-rail {
  position: relative;
  min-height: 4rem;
  margin-top: clamp(1.8rem, 5.5vw, 5.25rem);
  padding: 1.6rem 8rem .65rem 0;
  border-bottom: 1px solid currentColor;
}
.foot-rail small { font-size: .77rem; font-family: var(--mono); }

/* The camera walks a few steps along the rule and takes a picture. */
.foot-camera { position: absolute; right: .4rem; bottom: 0; width: 48px; height: 43px; pointer-events: none; }
.foot-camera-body {
  position: absolute; inset: 8px 2px 9px;
  border: 1.6px solid currentColor; border-radius: 6px; background: var(--footer-orange);
}
.foot-camera-body::before {
  content: ""; position: absolute; top: -6px; left: 13px; width: 12px; height: 6px;
  border: 1.6px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0; background: var(--footer-orange);
}
.foot-camera-body::after {
  content: ""; position: absolute; right: 5px; top: 4px; width: 5px; height: 3px;
  border-radius: 1px; background: currentColor;
}
.foot-camera-lens {
  position: absolute; top: 4px; left: 12px; width: 16px; height: 16px;
  border: 1.6px solid currentColor; border-radius: 50%;
}
.foot-camera-lens::after { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 50%; }
.foot-camera-legs::before, .foot-camera-legs::after {
  content: ""; position: absolute; bottom: 0; left: 12px; width: 7px; height: 12px;
  border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  border-radius: 0 0 0 3px; transform-origin: center top;
}
.foot-camera-legs::after { left: 31px; }
.foot-camera-flash {
  position: absolute; top: -6px; right: -2px; width: 13px; height: 13px; opacity: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
@media (prefers-reduced-motion: no-preference) {
  .foot-rail.is-animating .foot-camera { animation: camera-arrive 2.8s ease-out both; }
  .foot-rail.is-animating .foot-camera-legs::before { animation: camera-step .46s ease-in-out 5; }
  .foot-rail.is-animating .foot-camera-legs::after { animation: camera-step .46s ease-in-out reverse 5; }
  .foot-rail.is-animating .foot-camera-flash { animation: camera-flash .45s ease-out 2.35s; }
}
@keyframes camera-arrive {
  0% { transform: translateX(-60px) rotate(-5deg); }
  20% { transform: translate(-48px, -3px) rotate(4deg); }
  40% { transform: translateX(-34px) rotate(-4deg); }
  60% { transform: translate(-19px, -3px) rotate(4deg); }
  78% { transform: translateX(-7px) rotate(-3deg); }
  86%, 100% { transform: none; }
}
@keyframes camera-step { 0%, 100% { rotate: 0deg; } 35% { rotate: 23deg; } 70% { rotate: -23deg; } }
@keyframes camera-flash { 20% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.45; } }

@media (max-width: 760px) {
  .foot-grid { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); row-gap: 1.75rem; }
  .foot-name { grid-column: 1 / -1; }
}

/* ---------- Chinese ---------- */
/* Give Traditional Chinese body copy more room between lines. */
html[lang="zh-Hant"] .page-wrap .copy, html[lang="zh-Hant"] .project-info p { line-height: 1.9; }
html[lang="zh-Hant"] .page-wrap { text-align: center; }
html[lang="zh-Hant"] .page-wrap .copy p { text-wrap: balance; }      /* even lines, no lone character on the last one */
html[lang="zh-Hant"] .about-intro { letter-spacing: .12em; }
html[lang="zh-Hant"] .cards h2, html[lang="zh-Hant"] .cards h3 { letter-spacing: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
