﻿:root {
  --bg: #fff;
  --text: #050505;
  --header-safe-space: 82px;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, Arial, sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:not(.project-card a) {
  position: relative;
}

a:not(.project-card a):not(.work-menu-list a)::before {
  position: absolute;
  top: 50%;
  left: -0.95em;
  width: 0;
  height: 0;
  border-top: 0.36em solid transparent;
  border-bottom: 0.36em solid transparent;
  border-left: 0.62em solid var(--text-hover-color, #25abe2);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

a:not(.project-card a):not(.work-menu-list a):hover::before,
a:not(.project-card a):not(.work-menu-list a):focus-visible::before {
  opacity: 1;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: max-content;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2px;
  padding: 16px clamp(16px, 3vw, 36px);
  text-align: left;
}

.mark-row {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
}

.mark,
.nav a {
  font-size: 17px;
  font-weight: 500;
  text-transform: lowercase;
}

.nav a {
  font-weight: 550;
}

.header-count-trigger {
  appearance: none;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: left;
}

.header-home-count {
  font-weight: 400;
}

.header-count-trigger::before {
  position: absolute;
  top: 50%;
  right: -0.95em;
  width: 0;
  height: 0;
  border-top: 0.36em solid transparent;
  border-right: 0.62em solid var(--text-hover-color, #25abe2);
  border-bottom: 0.36em solid transparent;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.header-count-trigger:hover::before,
.header-count-trigger:focus-visible::before {
  opacity: 1;
}

.number {
  font-size: 17px;
  font-weight: 400;
  text-transform: lowercase;
}

.caption {
  font-size: 17px;
  font-weight: 400;
  text-transform: lowercase;
}

.nav {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  gap: clamp(12px, 1.6vw, 18px);
}

.project-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  column-gap: clamp(80px, 8vw, 180px);
  row-gap: clamp(42px, 5vw, 120px);
  margin-top: 10px;
  padding: 0 10px 12vh;
  align-items: flex-start;
}

.layout-void {
  flex: 0 0 var(--void-width, 360px);
  min-width: min(var(--void-width, 360px), 72vw);
  height: var(--void-height, 220px);
  margin: var(--void-margin, 0);
  pointer-events: none;
}

.project-card {
  flex: 0 0 var(--card-width, 280px);
  margin: var(--space-top, 80px) var(--space-right, 90px) var(--space-bottom, 100px) var(--space-left, 0);
  align-self: var(--card-align, flex-start);
  transform: translate(var(--offset-x, 0), calc(var(--offset-y, 0) + var(--header-drop, 0px)));
}

.project-card a {
  position: relative;
  display: grid;
  gap: 8px;
}

.project-card a::after {
  position: absolute;
  top: 0;
  left: -18px;
  z-index: 2;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid var(--hover-marker-color, #25abe2);
  content: "";
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.project-card:hover a::after,
.project-card a:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.project-card img {
  background: #f3f3f3;
  opacity: 1;
  transition: opacity 300ms ease;
}

.project-card.is-loading img {
  opacity: 0;
}

.work-menu {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: clamp(20px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
}

.work-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.work-menu.is-closing {
  opacity: 1;
  pointer-events: none;
}

.work-menu-list {
  display: grid;
  gap: clamp(8px, 1.4vw, 18px);
  width: max-content;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.work-menu-list a {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-self: center;
  padding: 0 0.22em;
  background: linear-gradient(to right, #fff 50%, #fff 50%);
  background-position: 0 0;
  background-size: 200% 100%;
  font-size: 17px;
  line-height: 1.12;
  white-space: nowrap;
  transition: background-position 180ms ease, transform 180ms ease;
}

.work-menu-list a::after {
  position: absolute;
  top: 50%;
  left: -0.95em;
  display: block;
  width: 0;
  height: 0;
  border-top: 0.36em solid transparent;
  border-bottom: 0.36em solid transparent;
  border-left: 0.62em solid var(--text-hover-color, #25abe2);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.work-menu-list a:hover::after,
.work-menu-list a:focus-visible::after {
  opacity: 1;
}

.work-menu-dot {
  display: inline-block;
  margin-right: 0.45em;
  font-size: 1em;
  line-height: 1;
  padding-top: 0.04em;
}

.work-menu-list a:hover,
.work-menu-list a:focus-visible {
  background-position: -100% 0;
  transform: translateX(4px);
}

.work-menu.is-open .work-menu-list a {
  animation: titleSlideIn 160ms ease both;
}

.work-menu.is-closing .work-menu-list a {
  animation: titleSlideOut 160ms ease both;
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (max-width: 1100px) {
  .work-menu-list {
    width: min(100%, calc(100vw - 32px));
  }

  .work-menu-list a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.caption {
  padding-top: 6px;
  line-height: 1.14;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.viewer-page {
  display: grid;
  gap: clamp(72px, 10vh, 140px);
  padding: 12vh clamp(16px, 5vw, 72px) 24vh;
  align-items: start;
}

.viewer-title {
  position: fixed;
  bottom: 16px;
  left: 50%;
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.14;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  pointer-events: none;
}

.viewer-item {
  width: min(100%, var(--viewer-width, 1120px));
  margin: 0;
  justify-self: var(--viewer-align, center);
  transform: translateX(var(--viewer-offset, 0));
}

.viewer-item img {
  opacity: 1;
  transition: opacity 420ms ease;
}

.viewer-item.is-loading img {
  opacity: 0;
}

.info-page {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 900px);
  gap: clamp(32px, 7vw, 120px);
  min-height: 100vh;
  padding: var(--header-safe-space) clamp(16px, 3vw, 36px) 18vh;
  align-items: start;
  margin-top: 0;
}

.info-copy {
  grid-column: 2;
}

.info-page p,
.info-links a,
.info-section h2,
.info-row,
.experience-list {
  margin: 0;
  font-size: 17px;
  font-weight: 250;
  line-height: 1.12;
}

.info-page p {
  text-align: justify;
}

.info-page .intro-line {
  text-align: left;
}

.info-section {
  margin-top: 1.08em;
}

.info-section:first-of-type {
  margin-top: 2.16em;
}

.info-section h2 {
  font-weight: 300;
  margin-bottom: 1.08em;
}

.info-row,
.experience-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.experience-list {
  display: grid;
  gap: 0;
  margin-top: 1.08em;
  padding: 0;
  list-style: none;
}

.mention-note {
  align-self: flex-end;
  font-size: 0.68em;
}

.experience-date {
  margin-top: 1.08em;
}

.info-links {
  display: grid;
  justify-items: start;
  margin-top: 1.08em;
}

.info-note {
  position: fixed;
  bottom: 16px;
  right: clamp(16px, 3vw, 36px);
  width: min(900px, calc(100vw - 32px));
  margin-top: 0;
}

@media (max-width: 1100px) {
  .viewer-title {
    width: calc(100vw - 32px);
  }
}

@media (max-width: 860px) {
  .viewer-title {
    font-size: 17px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .viewer-page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .viewer-item {
    width: min(var(--viewer-mobile-width, 90%), calc(100vw - 24px));
    transform: translateX(calc(var(--viewer-offset, 0) * 0.25));
  }

  .info-page {
    grid-template-columns: 1fr;
    padding-bottom: 24vh;
  }

  .info-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .info-note {
    position: fixed;
    bottom: 16px;
    right: clamp(16px, 3vw, 36px);
    width: min(720px, calc(100vw - 32px));
    margin-top: 0;
  }

  .project-index {
    gap: clamp(22px, 5.5vw, 56px);
  }

  .project-card {
    flex-basis: min(58vw, var(--tablet-card-width, var(--mobile-card-width, 240px)));
    margin-top: var(--header-drop, 0px);
    transform: none;
  }

  .layout-void {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav a {
    font-weight: 550;
  }

  .header-home-count {
    font-weight: 400;
  }

  .info-page {
    margin-top: 0;
    padding-top: var(--header-safe-space);
  }

  .experience-list .with-note {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
  }

  .mention-note {
    justify-self: end;
    white-space: nowrap;
    font-size: 0.58em;
  }

  .project-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 22px;
    margin-top: 0;
    padding: 64px 18px 12vh;
    overflow-x: clip;
  }

  .is-phone-home-preparing .project-index {
    visibility: hidden;
  }

  .layout-void {
    display: block;
    justify-self: center;
    width: min(var(--phone-void-width, 12%), 24%);
    max-width: 100%;
    height: var(--phone-void-height, 6px);
    margin: var(--phone-void-margin, 1px 0 2px 0);
  }

  .project-card {
    display: block;
    justify-self: var(--phone-card-align, start);
    box-sizing: border-box;
    width: min(var(--phone-column-width, 84%), 90%);
    max-width: 100%;
    margin: var(--phone-space-top, 5px) 0 var(--phone-space-bottom, 5px) var(--phone-column-shift, 0);
    transform: translate(var(--phone-offset-x, 0), var(--phone-offset-y, 0));
  }

  .number {
    font-size: 17px;
  }
}
