* {
  box-sizing: border-box;
}

@font-face {
  font-family: "TWK Continental";
  src: url("fonts/TWKContinental-Regular.woff2") format("woff2"),
       url("fonts/TWKContinental-Regular.woff") format("woff"),
       url("fonts/TWKContinental-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TWK Continental";
  src: url("fonts/TWKContinental-Bold.woff2") format("woff2"),
       url("fonts/TWKContinental-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "TWK Continental", Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  color: #000;
  background: #fff;
  padding: 20px 24px 48px;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 590px;
  margin: 0 auto;
}

.back-link {
  position: fixed;
  top: 20px;
  left: 24px;
  font-size: inherit;
  font-weight: 400;
  color: #000;
  text-decoration: none;
  z-index: 100;
}

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

.page > :not(.hero):not(.bio):not(.project-intro):not(.still-viewer):not(.photobook-section):not(.project-video):not(.project-footer) {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- hero video ---------- */

.hero {
  width: 52%;
  max-width: 300px;
  margin: 0 auto 18px;
}

.hero video {
  display: block;
  width: 100%;
  height: auto;
}

.hero .play-button,
.video-frame .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .play-button::after,
.video-frame .play-button::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #9a9a9a;
  transform: translateX(3px);
}

.hero .play-button.hidden {
  display: none;
}

.hero-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 13px;
  text-align: center;
  padding: 20px;
  border: 1px dashed #ccc;
}

/* ---------- text blocks ---------- */

h1.name {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.contact {
  text-align: center;
  margin-bottom: 12px;
}

.social-links {
  text-align: center;
  margin-bottom: 26px;
}

.social-links a + a {
  margin-left: 1.5em;
}

a {
  color: #0000ee;
  text-decoration: underline;
  text-underline-offset: 1px;
}

a:visited {
  color: #0000ee;
}

a:hover {
  color: #333399;
}

.bio {
  text-align: center;
  font-size: inherit;
  line-height: 1.3;
  margin: 0 auto 20px;
  width: 100%;
  max-width: 590px;
}

.bio-intro {
  margin: 0 0 16px;
  white-space: nowrap;
}

.bio-body {
  margin: 0;
}

h2.section-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.link-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: center;
}

.link-list li {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.2;
}

.link-list li:last-child {
  margin-bottom: 0;
}

.link-list:last-of-type {
  margin-bottom: 0;
}

/* ---------- project page ---------- */

.project-intro {
  text-align: center;
  font-size: inherit;
  line-height: 1.3;
  margin: 0 auto 20px;
  width: fit-content;
  max-width: 100%;
}

.project-intro p {
  margin: 0;
}

.project-intro-line {
  margin: 0;
  white-space: nowrap;
}

.project-intro-question {
  margin: 16px 0 0;
  white-space: nowrap;
}

h1.project-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

h1.project-title.project-title-nowrap {
  white-space: nowrap;
  max-width: none;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.project-credits {
  text-align: center;
  font-size: inherit;
  font-weight: 400;
  color: #000;
  margin: 0 0 30px;
}

.project-video {
  margin-bottom: 4px;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #f2f2f2;
  overflow: hidden;
}

.video-frame.video-poster {
  padding-bottom: 0;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-footer {
  text-align: center;
  font-size: inherit;
  line-height: 1.3;
  margin: 44px auto 60px;
  width: fit-content;
  max-width: 100%;
}

.project-footer p {
  margin: 0;
}

.project-footer p + p {
  margin-top: 4px;
}

.project-footer .project-footer-spaced {
  margin-top: 16px;
}

/* still viewer */

.still-viewer {
  margin-bottom: 4px;
}

.still-frame {
  width: 100%;
  background: #f2f2f2;
  overflow: hidden;
}

.still-frame img,
.still-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.still-frame .video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #f2f2f2;
  overflow: hidden;
}

.still-frame .video-frame.video-poster {
  padding-bottom: 0;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.still-frame .video-frame.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.still-frame .video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.still-empty {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 13px;
  text-align: center;
  padding: 20px;
  border: 1px dashed #ccc;
}

.still-empty code {
  background: #f4f4f4;
  padding: 1px 5px;
}

.still-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-style: italic;
  font-size: 13px;
  margin: 10px 0 44px;
}

.still-caption-text {
  flex: 1;
  text-align: left;
}

.still-arrows {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.still-arrows button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  font-style: normal;
  padding: 2px 4px;
  color: #000;
  line-height: 1;
  flex: 0 0 auto;
}

.still-arrows button:disabled {
  opacity: 0.25;
  cursor: default;
}

/* photobook */

.photobook-title {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 0 5px;
  font-size: inherit;
  font-weight: 700;
  color: #000;
}

.photobook-viewer {
  width: 78%;
  max-width: 460px;
  margin: 0 auto;
}

.photobook-frame {
  width: 100%;
  overflow: hidden;
}

.photobook-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.photobook-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 14px;
}

.photobook-thumbs {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 14px;
}

.photobook-thumbs button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.photobook-thumbs img {
  display: block;
  height: 200px;
  width: auto;
  max-width: 45vw;
  object-fit: contain;
}

.photobook-empty {
  border: 1px dashed #ccc;
  color: #888;
  font-size: 13px;
  line-height: 1.6;
  padding: 24px;
  text-align: center;
  margin-bottom: 14px;
}

.photobook-empty code {
  background: #f4f4f4;
  padding: 1px 5px;
}

.photobook-caption {
  text-align: center;
  font-size: inherit;
  margin: 6px 0 60px;
}

/* lightbox */

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 92vw;
}

.lightbox-arrow {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 10px;
  flex: 0 0 auto;
}

.lightbox-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.lightbox-image-wrap {
  max-width: 74vw;
  max-height: 76vh;
}

.lightbox-image-wrap img {
  display: block;
  max-width: 74vw;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-empty {
  color: #ccc;
  font-size: 14px;
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}

.lightbox-empty code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  color: #fff;
}

.lightbox-footer {
  margin-top: 18px;
  text-align: center;
}

.lightbox-counter {
  color: #999;
  font-size: 12px;
  margin-bottom: 8px;
}

.lightbox-buy {
  color: #fff;
  font-size: 14px;
}

.lightbox-buy.buy-disabled {
  color: #777;
  font-style: italic;
  text-decoration: none;
}

/* ---------- mobile ---------- */

@media (max-width: 600px) {
  body {
    padding: 16px 20px 40px;
    overflow-x: clip;
  }

  .back-link {
    position: static;
    display: block;
    margin-bottom: 20px;
  }

  .project-intro,
  .project-footer {
    width: 100%;
  }

  .project-intro-line,
  .project-intro-question,
  .bio-intro {
    white-space: normal;
    overflow-wrap: break-word;
  }

  h1.project-title.project-title-nowrap {
    white-space: normal;
  }
}
