:root {
  --color-dark: #0c0c0c;
  --color-light: #f5f3f0;
  --color-muted: #d8d6d1;
  --space-base: 0.4rem;
  --space-1: calc(var(--space-base) * 1);
  --space-2: calc(var(--space-base) * 2);
  --space-3: calc(var(--space-base) * 3);
  --space-4: calc(var(--space-base) * 4);
  --space-6: calc(var(--space-base) * 6);
  --space-8: calc(var(--space-base) * 8);
  --space-12: calc(var(--space-base) * 12);
  --space-16: calc(var(--space-base) * 16);
  --space-20: calc(var(--space-base) * 20);
  --space-24: calc(var(--space-base) * 24);
  --ease: cubic-bezier(.77, 0, .175, 1);
  --ease-soft: cubic-bezier(.5, 0, .5, 1);
  --font-display: "Arial Narrow", "Helvetica Neue Condensed Bold", Impact, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --header-size: 6.4rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--color-light);
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 62.5%;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--color-light);
  color: var(--color-dark);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: .95;
  text-transform: uppercase;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-light);
  pointer-events: none;
  opacity: 1;
  transition: opacity .55s var(--ease-soft), visibility .55s var(--ease-soft);
}

body.has-loaded::before {
  opacity: 0;
  visibility: hidden;
}

a,
button {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-transform: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-error {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1000;
  width: min(42rem, calc(100vw - var(--space-8)));
  font-size: 2.4rem;
  line-height: 1.05;
  text-align: center;
  transform: translate(-50%, -50%);
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
}

.site-header {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  z-index: 1000;
  transform: translateX(-50%);
}

.language-switch {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  opacity: 0;
  transform: translateY(50%) rotateX(-40deg);
  transform-style: preserve-3d;
  transition: opacity .79s var(--ease) .15s, transform .79s var(--ease) .15s;
}

.has-loaded .language-switch {
  opacity: 1;
  transform: none;
}

.language-switch span {
  opacity: .55;
}

.nav-toggle {
  position: relative;
  width: 4.2rem;
  height: 4.2rem;
  opacity: 0;
  transform: translateY(50%) rotateX(-40deg);
  transform-style: preserve-3d;
  transition: opacity .79s var(--ease) .15s, transform .79s var(--ease) .15s;
}

.has-loaded .nav-toggle {
  opacity: 1;
  transform: none;
}

.nav-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3rem;
  height: .26rem;
  background: var(--color-dark);
  transform: translate(-50%, -50%);
  transition: transform .5s var(--ease);
}

.nav-toggle span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
}

.nav-open .nav-toggle span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translate(-50%, -50%) rotate(135deg);
}

.nav-screen {
  position: fixed;
  inset: 0;
  z-index: 990;
  height: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-light) 92%, transparent);
  filter: blur(12px);
  pointer-events: none;
  transition: height .01s linear .75s, filter .49s var(--ease-soft) .1s;
}

.nav-open .nav-screen {
  height: 100%;
  filter: blur(0);
  pointer-events: all;
  transition: height .01s linear, filter .49s var(--ease-soft);
}

.nav-screen__inner {
  min-height: 100%;
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-12);
}

.nav-screen__nav {
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  font-size: 5.8rem;
}

.nav-screen__nav a,
.nav-screen__footer a,
.language-switch button,
.focus-actions a,
.focus-actions button,
.view-switch button {
  border-bottom: .22rem solid transparent;
}

.nav-screen__nav a:hover,
.nav-screen__footer a:hover,
.language-switch button:hover,
.language-switch button.is-active,
.focus-actions a:hover,
.focus-actions button:hover,
.view-switch button:hover,
.view-switch button.is-active {
  border-bottom-color: currentColor;
}

.nav-screen__about {
  width: min(78rem, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 9.6rem 1fr;
  gap: var(--space-6);
  align-items: center;
  text-align: left;
  font-size: 3.2rem;
  line-height: 1;
}

.nav-screen__avatar {
  width: 9.6rem;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1);
}

.nav-screen__footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
}

.nav-screen__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.overview {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.brand-title {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 50;
  max-width: 80vw;
  width: max-content;
  transform: translate(-50%, -50%);
  font-size: 7.4rem;
  line-height: .85;
  text-align: center;
  pointer-events: none;
  perspective: 1000px;
}

.brand-title span {
  display: block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(50%) rotateX(-40deg);
  transform-origin: center;
  transition: opacity .79s var(--ease) .6s, filter .79s var(--ease) .6s, transform .79s var(--ease) .6s;
}

.home.has-finished .brand-title span {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.c-element-overviewgrid {
  --offset-gap: 12vh;
  --col-gap: 6vw;
  --row-gap: 22vh;
  --translate-x: 0px;
  --translate-y: 0px;
  width: 110%;
  min-height: 180vh;
  position: relative;
  left: -5%;
  top: calc(var(--offset-gap) * -1);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: var(--col-gap);
  row-gap: var(--row-gap);
  overflow: hidden;
}

.c-element-overviewgrid .overview-item {
  height: calc((100svh + var(--offset-gap) * 2) / 3 - var(--row-gap) * 2 / 3);
  min-height: 11rem;
  position: relative;
  opacity: 0 !important;
  transform-origin: center;
}

.c-element-overviewgrid .overview-item:nth-child(5n + 2),
.c-element-overviewgrid .overview-item:nth-child(5n + 4) {
  transform: translateY(calc(50% + var(--row-gap) / 2));
}

.c-element-overviewgrid .overview-item.is-visible {
  z-index: var(--z-index);
  transition: opacity 0s;
  transition-delay: calc(var(--z-index, 1) * .1s);
}

.c-element-overviewgrid .fs-media {
  width: 110%;
  height: 120%;
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(calc(var(--translate-x) - 50%), calc(var(--translate-y) - 50%));
}

.c-element-overviewgrid .fs-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  pointer-events: all;
}

body.has-loaded .c-element-overviewgrid .overview-item {
  display: inline-block;
  opacity: 1 !important;
}

body.has-loaded .c-element-overviewgrid .overview-item .fs-media {
  opacity: 1;
}

body.has-finished .c-element-overviewgrid .overview-item.is-visible .fs-media {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all .2s var(--ease);
  transition-delay: calc(var(--delay, 1) * .01s);
  transition-duration: var(--duration);
}

body.has-finished .c-element-overviewgrid .overview-item .fs-media {
  opacity: 1 !important;
}

html.has-landed .c-element-overviewgrid .overview-item,
html.has-landed .c-element-overviewgrid .overview-item .fs-media {
  opacity: 1 !important;
}

.c-element-overviewgrid .overview-item:hover .fs-media {
  transform: translate(-50%, -50%) scale(1.04);
}

.work-page {
  padding: var(--space-24) var(--space-8) var(--space-24);
}

.work-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-20) var(--space-16);
  align-items: start;
}

.work-item {
  grid-column: span 5;
  display: grid;
  gap: var(--space-3);
  opacity: 0;
  filter: blur(10px);
  transform: translateY(2rem);
  transition: opacity .65s var(--ease) var(--delay), filter .65s var(--ease) var(--delay), transform .65s var(--ease) var(--delay);
}

.has-loaded .work-item {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.work-item:nth-child(4n + 1) {
  grid-column: 1 / span 5;
}

.work-item:nth-child(4n + 2) {
  grid-column: 8 / span 5;
  margin-top: 34vh;
}

.work-item:nth-child(4n + 3) {
  grid-column: 2 / span 4;
}

.work-item:nth-child(4n) {
  grid-column: 7 / span 5;
  margin-top: 12vh;
}

.work-item__image {
  display: block;
  overflow: hidden;
}

.work-item__image img {
  width: 100%;
  height: auto;
  transition: transform .8s var(--ease);
}

.work-item:hover .work-item__image img {
  transform: scale(1.035);
}

.work-item__text {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 2rem;
  line-height: 1;
}

.work-item__meta {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  align-self: end;
}

body[data-view="list"] .work-page {
  padding-top: 18vh;
}

body[data-view="list"] .work-board {
  display: block;
  max-width: 118rem;
  margin: 0 auto;
}

body[data-view="list"] .work-item {
  position: relative;
  min-height: 5.8rem;
  margin: 0;
  display: flex;
  align-items: center;
  border-top: .2rem solid var(--color-dark);
}

body[data-view="list"] .work-item:last-child {
  border-bottom: .2rem solid var(--color-dark);
}

body[data-view="list"] .work-item__image {
  position: fixed;
  top: 50%;
  right: var(--space-8);
  z-index: 40;
  width: min(34vw, 44rem);
  max-height: 72vh;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(2rem);
  transition: opacity .38s var(--ease-soft), transform .38s var(--ease-soft);
}

body[data-view="list"] .work-item__image img {
  max-height: 72vh;
  object-fit: contain;
}

body[data-view="list"] .work-item:hover .work-item__image {
  opacity: 1;
  transform: translateY(-50%);
}

body[data-view="list"] .work-item__text {
  width: 100%;
  font-size: 4.4rem;
}

.view-switch {
  position: fixed;
  bottom: var(--space-4);
  left: 50%;
  z-index: 80;
  display: flex;
  gap: var(--space-8);
  transform: translateX(-50%);
}

.focus-shell {
  min-height: 100vh;
  padding: 0 var(--space-4);
}

.focus-title {
  display: none;
}

.focus-rail {
  position: relative;
  top: auto;
  left: 0;
  z-index: 80;
  width: 12rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: visible;
  padding-top: calc(50vh - var(--first-thumb-height, 8rem) / 2);
  padding-bottom: calc(50vh - var(--last-thumb-height, 8rem) / 2);
  scrollbar-width: none;
}

.focus-rail::-webkit-scrollbar {
  display: none;
}

.focus-thumb {
  width: 8rem;
  opacity: 0;
  filter: blur(8px);
  transform: translateX(var(--focus-shift, 0px));
  transition: opacity .65s var(--ease) var(--delay), filter .65s var(--ease) var(--delay);
  will-change: transform;
}

.focus-thumb__media {
  display: block;
  line-height: 0;
  transform: translateX(calc(-80px - var(--space-8)));
  transition: transform .79s var(--ease) var(--delay);
}

.has-loaded .focus-thumb {
  opacity: .56;
  filter: blur(0);
  transform: translateX(var(--focus-shift, 0px));
}

.has-loaded .focus-thumb__media {
  transform: none;
}

.focus-thumb.is-active {
  opacity: 1;
}

.focus-thumb img {
  width: 100%;
  height: auto;
}

.focus-main {
  position: fixed;
  top: calc(var(--space-16) + var(--space-2));
  left: 50%;
  z-index: 40;
  width: min(64vw, 76rem);
  height: calc(100vh - 15rem);
  transform: translateX(-50%);
  transition: opacity .65s var(--ease-soft), filter .65s var(--ease-soft);
  pointer-events: none;
}

.focus-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.focus-main figcaption {
  position: absolute;
  top: 0;
  right: -2.2rem;
  height: 100%;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
}

.focus-actions {
  position: fixed;
  bottom: var(--space-4);
  left: 50%;
  z-index: 90;
  display: flex;
  gap: var(--space-6);
  transform: translateX(-50%);
  white-space: nowrap;
}

.focus-info {
  position: fixed;
  inset: calc(var(--space-16) + var(--space-4)) max(16vw, var(--space-8));
  z-index: 65;
  display: grid;
  place-items: center;
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
  transition: opacity .49s var(--ease-soft), filter .49s var(--ease-soft);
}

.focus-info > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: var(--space-8);
  align-items: center;
}

.focus-info__avatar {
  width: 12rem;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1);
}

.focus-info p {
  font-size: 4.2rem;
  line-height: 1;
}

.focus-shell.is-info .focus-main,
.focus-shell.is-index .focus-main {
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
}

.focus-shell.is-info .focus-info {
  opacity: 1;
  filter: blur(0);
  pointer-events: all;
}

.focus-shell.is-index::before,
.focus-shell.is-info::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 55;
  background: color-mix(in srgb, var(--color-light) 70%, transparent);
  backdrop-filter: blur(12px);
}

.focus-shell.is-index .focus-rail {
  inset: calc(var(--space-16) + var(--space-3)) var(--space-4) calc(var(--space-16) + var(--space-3));
  width: auto;
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 15rem));
  justify-content: center;
  align-content: center;
  gap: var(--space-8);
  transform: none;
}

.focus-shell.is-index .focus-thumb,
.focus-shell.is-index .focus-thumb.is-active {
  width: 100%;
  height: auto;
  opacity: 1;
  transform: none;
}

.focus-shell.is-index .focus-thumb__media {
  transform: none;
}

.focus-shell.is-index .focus-thumb img {
  height: auto;
}

@media (max-width: 768px) {
  body {
    font-size: 2.1rem;
  }

  .site-header {
    top: var(--space-3);
  }

  .language-switch {
    top: var(--space-3);
    left: var(--space-4);
  }

  .nav-screen__inner {
    padding: var(--space-3) var(--space-4);
  }

  .nav-screen__nav {
    font-size: 3.8rem;
  }

  .nav-screen__about {
    grid-template-columns: 1fr;
    font-size: 2.6rem;
    text-align: center;
  }

  .nav-screen__avatar,
  .focus-info__avatar {
    margin: 0 auto;
  }

  .brand-title {
    font-size: 4.8rem;
  }

  .c-element-overviewgrid {
    --col-gap: var(--space-4);
    --offset-gap: 8vh;
    width: 100%;
    left: 0;
  }

  .c-element-overviewgrid .fs-media {
    width: 160%;
    height: 70%;
  }

  .work-page {
    padding: var(--space-20) var(--space-4) var(--space-20);
  }

  .work-board {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
  }

  .work-item,
  .work-item:nth-child(n) {
    grid-column: auto;
    margin-top: 0;
  }

  .work-item__text {
    font-size: 1.7rem;
  }

  body[data-view="list"] .work-item__text {
    font-size: 2.8rem;
  }

  body[data-view="list"] .work-item__image {
    display: none;
  }

  .view-switch,
  .focus-actions {
    bottom: var(--space-3);
    gap: var(--space-6);
  }

  .focus-actions {
    z-index: 1100;
  }

  .focus-shell {
    --mobile-thumb-height: var(--space-16);
    --mobile-thumb-lift: var(--space-6);
    --mobile-focus-top: calc(var(--space-24) + var(--space-2));
    --mobile-rail-bottom: calc(var(--space-20) + var(--space-8));
    --mobile-focus-bottom-clearance: calc(var(--mobile-rail-bottom) + var(--mobile-thumb-height) + var(--mobile-thumb-lift) + var(--space-6));
    padding: var(--space-20) var(--space-4);
    min-height: 100svh;
  }

  .focus-main {
    top: var(--mobile-focus-top);
    width: calc(100vw - var(--space-8));
    height: calc(100svh - var(--mobile-focus-top) - var(--mobile-focus-bottom-clearance));
  }

  .focus-main figcaption {
    right: -.6rem;
    font-size: 1rem;
  }

  .focus-rail {
    position: fixed;
    top: auto;
    bottom: var(--mobile-rail-bottom);
    left: 0;
    z-index: 120;
    width: 100vw;
    height: calc(var(--mobile-thumb-height) + var(--mobile-thumb-lift));
    min-width: 0;
    max-height: calc(var(--mobile-thumb-height) + var(--mobile-thumb-lift));
    padding-top: var(--mobile-thumb-lift);
    padding-bottom: 0;
    padding-left: calc(50vw - var(--first-thumb-width, 8rem) / 2);
    padding-right: calc(50vw - var(--last-thumb-width, 8rem) / 2);
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-3);
    overflow-x: auto;
    overflow-y: visible;
    transform: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .focus-thumb {
    flex: 0 0 auto;
    width: auto;
    height: var(--mobile-thumb-height);
    transform: translateY(calc(var(--focus-shift, 0px) * -1));
  }

  .focus-thumb__media {
    height: 100%;
    transform: translateY(calc(var(--space-20) + var(--space-4)));
  }

  .focus-thumb img {
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: contain;
  }

  .has-loaded .focus-thumb {
    transform: translateY(calc(var(--focus-shift, 0px) * -1));
  }

  .focus-thumb.is-active {
    opacity: 1;
  }

  .focus-info {
    inset: calc(var(--space-20) + var(--space-4)) var(--space-4);
  }

  .focus-info > div {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .focus-info p {
    font-size: 2.8rem;
  }

  .focus-shell.is-index .focus-rail {
    inset: calc(var(--space-20) + var(--space-8)) var(--space-4) calc(var(--space-16) + var(--space-8));
    width: auto;
    height: auto;
    max-height: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    align-items: flex-start;
    gap: var(--space-8);
    overflow-x: hidden;
    overflow-y: auto;
    transform: none;
  }

  .focus-shell.is-index .focus-thumb,
  .focus-shell.is-index .focus-thumb.is-active {
    flex: 0 0 auto;
    width: auto;
    height: var(--space-20);
    display: inline-block;
    opacity: 1;
    filter: blur(0);
    transform: none;
  }

  .focus-shell.is-index .focus-thumb__media {
    height: 100%;
    transform: none;
  }

  .focus-shell.is-index .focus-thumb img {
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: contain;
  }
}

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