﻿:root {
  --bg-top: #f2ece4;
  --bg-bottom: #ddd4c8;
  --text: #050505;
  --cursor-bg: rgba(255, 255, 255, 0.82);
  --ui-font: "Lekton", monospace;
  --ui-size: 14px;
  --ui-weight: 400;
  --ui-transition: color 180ms ease, transform 180ms ease, opacity 180ms ease;
  --nav-name: #050505;
  --nav-muted: #050505;
  --menu-link: #050505;
  --tracking-tight: -0.018em;
  --texture-image: url("img/texture/grunge-wall-texture.jpg");
  --texture-size: cover;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
  scrollbar-width: none; /* Masque la barre sur Firefox */
  -ms-overflow-style: none; /* Masque la barre sur IE et Edge */
}

/* Masque la barre sur Chrome, Safari et Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  color: var(--text);
  background-color: #ffffff;
  font-family: var(--ui-font);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: 0.98;
  transition: background-color 180ms ease, color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--texture-image);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: var(--texture-size);
  opacity: 0.22;
  filter: grayscale(1) contrast(1) brightness(1.03);
  mix-blend-mode: normal;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 16%,
    rgba(0, 0, 0, 0.86) 58%,
    transparent 100%
  );
  opacity: 0.42;
  pointer-events: none;
}

.site-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 320;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(5, 5, 5, 0.72);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 220ms ease;
}

button {
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

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

.top-nav {
  position: fixed;
  top: 8px;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  padding: 0 18px;
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.top-nav__item {
  color: var(--nav-muted);
  text-decoration: none;
  white-space: nowrap;
}

.top-nav__center {
  position: absolute;
  left: 50%;
  top: 13px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.top-nav__item {
  cursor: pointer;
}

.top-nav__language {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 0;
}

.top-nav__time {
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
  pointer-events: none;
}

.top-nav__item:hover,
.top-nav__item:focus-visible {
  color: var(--nav-name);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.top-nav__item:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.page-loading-screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
}

.page-loading-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--texture-image);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: var(--texture-size);
  opacity: 0.04;
  filter: grayscale(1) contrast(1) brightness(1.03);
  pointer-events: none;
}

.page-loading-screen::after {
  display: none;
}

.page-loading-screen__label {
  position: relative;
  z-index: 2;
}

.gallery-section,
#nav-placeholder,
.site-clock,
.site-signature {
  transition:
    opacity 820ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 820ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 820ms;
}

.gallery-category-nav {
  transition:
    opacity 820ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.home-intro-enabled #nav-placeholder,
body.home-intro-enabled .site-signature {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

body.home-intro-enabled .gallery-category-nav {
  opacity: 0;
  pointer-events: none;
}

body.home-intro-enabled.home-intro-text-visible #nav-placeholder,
body.home-intro-enabled.home-intro-text-visible .site-signature {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

body.home-intro-enabled.home-intro-text-visible .gallery-category-nav {
  opacity: 1;
  pointer-events: auto;
}


.top-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  height: auto;
}

.top-nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-top: 7px;
  justify-self: start;
}

.top-nav__center {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 7px;
  justify-self: center;
  text-align: center;
}

.top-nav__meta {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-top: 7px;
  justify-self: end;
}

.top-nav__item {
  color: var(--menu-link);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: color 180ms ease;
}

.top-nav__link.is-current {
  color: var(--nav-name);
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.top-nav__link.is-current:focus-visible {
  outline: none;
}

.top-nav__link:hover,
.top-nav__link:focus-visible {
  color: var(--nav-name);
}

.top-nav__link.is-current:hover,
.top-nav__link.is-current:focus-visible {
  color: var(--nav-name);
}

.site-signature {
  position: fixed;
  left: 30px;
  bottom: 18px;
  z-index: 55;
  margin: 0;
  color: var(--menu-link);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  pointer-events: none;
}

.site-clock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 55;
  margin: 0;
  transform: translateX(-50%);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 640px) {
  .top-nav {
    top: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    padding: 0 14px;
    font-size: 11px;
  }

  .top-nav__links {
    gap: 10px;
    padding-top: 5px;
  }

  .top-nav__center {
    display: none;
  }

  .top-nav__meta {
    gap: 14px;
    padding-top: 5px;
  }

  .top-nav__time {
    font-size: 10px;
  }

  .site-signature {
    left: 20px;
    bottom: 16px;
  }

  .site-clock {
    bottom: 16px;
    font-size: 10px;
  }

}

/* Home gallery redesign */
body:not(.project-page):not(.about-page) {
  background-color: #fbfaf7;
}

body:not(.project-page):not(.about-page)::after {
  background:
    radial-gradient(circle at 17% 36%, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 50% 58%, rgba(245, 243, 238, 0.92) 0, rgba(245, 243, 238, 0) 26%),
    radial-gradient(circle at 82% 34%, rgba(255, 255, 255, 0.94) 0, rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle at 70% 76%, rgba(244, 241, 234, 0.84) 0, rgba(244, 241, 234, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 247, 242, 0.9));
  background-size: auto;
  mask-image: none;
  opacity: 0.86;
}

.gallery-section {
  --gallery-image-width: clamp(154px, 11.3vw, 216px);
  --gallery-index-width: 28px;
  --gallery-index-gap: 12px;
  --gallery-columns: 4;
  --gallery-row-tilt: 0.58deg;
  --gallery-column-gap: clamp(28px, 2.9vw, 48px);
  --gallery-row-gap: clamp(166px, 13vw, 228px);
  --gallery-shell-width: min(1680px, calc(100vw - 184px));
  padding: 132px 112px 132px;
}

.gallery-category-nav {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 72;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gallery-category-nav__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: max-content;
}

.gallery-category-nav__button {
  position: static;
  transform: none;
  pointer-events: auto;
  color: var(--nav-muted);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  text-align: center;
  white-space: nowrap;
  transition: color 180ms ease, opacity 180ms ease;
}

.gallery-category-nav__button:hover,
.gallery-category-nav__button:focus-visible,
.gallery-category-nav__button.is-active {
  color: var(--nav-name);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.gallery-category-nav__button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.gallery {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gallery-row-gap);
  width: var(--gallery-shell-width);
  height: auto;
  margin: 0 auto;
  transform: none;
  will-change: auto;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), var(--gallery-image-width));
  justify-content: space-between;
  align-items: start;
  column-gap: var(--gallery-column-gap);
  width: 100%;
  transform: rotate(var(--gallery-row-tilt));
  transform-origin: center center;
}

.gallery-card {
  position: relative;
  top: auto;
  left: auto;
  width: var(--gallery-image-width);
  min-width: 0;
  aspect-ratio: auto;
  display: block;
  align-items: start;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 180ms ease;
  will-change: auto;
}

.gallery-card:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

.gallery-card {
  cursor: default;
}

.gallery-card--static {
  cursor: default;
}

.gallery-card__index {
  position: absolute;
  top: clamp(102px, 8.8vw, 146px);
  right: calc(100% + var(--gallery-index-gap));
  display: block;
  width: var(--gallery-index-width);
  padding-top: 0;
  color: var(--nav-name);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  transition:
    filter 980ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 980ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card__body {
  display: block;
  width: 100%;
  min-width: 0;
}

.gallery-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: visible;
  background: transparent;
}

[data-card].gallery-card .gallery-card__media {
  cursor: pointer;
}

.gallery-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  transition:
    filter 980ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 980ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card__title {
  display: block;
  width: 100%;
  margin-top: 10px;
  color: var(--nav-name);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  text-align: center;
  transition:
    filter 980ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 980ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery.is-hover-active .gallery-card.is-hover-muted .gallery-card__media img {
  filter:
    blur(6px)
    brightness(1.46)
    saturate(0.34)
    contrast(0.62)
    drop-shadow(0 0 22px rgba(251, 250, 247, 0.96));
  opacity: 0.34;
}

.gallery.is-hover-active .gallery-card.is-hover-muted :is(.gallery-card__index, .gallery-card__title) {
  filter: blur(2px);
  opacity: 0.22;
}

.gallery.is-hover-active .gallery-card.is-hover-current .gallery-card__media img {
  filter: none;
  opacity: 1;
}

.gallery.is-hover-active .gallery-card.is-hover-current :is(.gallery-card__index, .gallery-card__title) {
  filter: none;
  opacity: 1;
}

.gallery.is-category-active .gallery-card {
  transition:
    opacity 260ms ease,
    filter 260ms ease;
}

.gallery.is-category-active .gallery-card.is-category-muted {
  opacity: 0.2;
}

.gallery.is-category-active .gallery-card.is-category-muted .gallery-card__media img {
  filter: grayscale(1) brightness(1.16) contrast(0.9);
  opacity: 0.14;
}

.gallery.is-category-active .gallery-card.is-category-muted :is(.gallery-card__index, .gallery-card__title) {
  filter: none;
  opacity: 0.16;
}

.gallery.is-category-active .gallery-card.is-category-match {
  opacity: 1;
}

@media (max-width: 1540px) {
  .gallery-section {
    --gallery-image-width: clamp(146px, 12.2vw, 194px);
    --gallery-row-tilt: 0.5deg;
    --gallery-shell-width: min(1460px, calc(100vw - 120px));
    padding-inline: 68px;
  }

}

@media (max-width: 1120px) {
  .gallery-section {
    --gallery-image-width: clamp(146px, 18vw, 198px);
    --gallery-columns: 3;
    --gallery-row-tilt: 0.4deg;
    --gallery-column-gap: 30px;
    --gallery-row-gap: 132px;
    --gallery-shell-width: min(1060px, calc(100vw - 72px));
    padding: 118px 40px 118px;
  }

  .gallery {
    width: var(--gallery-shell-width);
    margin-inline: auto;
  }
}

@media (max-width: 780px) {
  .gallery-section {
    --gallery-image-width: clamp(142px, 31vw, 188px);
    --gallery-index-width: 24px;
    --gallery-index-gap: 10px;
    --gallery-columns: 2;
    --gallery-row-tilt: 0.3deg;
    --gallery-column-gap: 26px;
    --gallery-row-gap: 98px;
    --gallery-shell-width: 100%;
    padding: 108px 40px 108px;
  }

  .gallery-category-nav {
    display: none;
  }

  .gallery-card__index,
  .gallery-card__title {
    font-size: var(--ui-size);
  }

  .gallery-card__index {
    top: clamp(96px, 16vw, 126px);
  }
}

@media (max-width: 640px) {
  .gallery-section {
    --gallery-index-width: 18px;
    --gallery-index-gap: 8px;
    --gallery-row-tilt: 0.22deg;
    --gallery-column-gap: 20px;
    --gallery-row-gap: 62px;
    padding: 104px 20px 104px;
  }

  .gallery-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "media media"
      "index title";
    align-items: start;
    column-gap: 6px;
    row-gap: 8px;
    width: var(--gallery-image-width);
    margin: 0;
  }

  .gallery-card__body {
    display: contents;
  }

  .gallery-card__media {
    grid-area: media;
    width: 100%;
  }

  .gallery-card__title {
    grid-area: title;
    font-size: 11px;
    margin-top: 0;
    text-align: left;
  }

  .gallery-card__index {
    position: static;
    grid-area: index;
    width: auto;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .gallery-section {
    --gallery-column-gap: 14px;
    --gallery-row-gap: 50px;
    padding-inline: 16px;
  }
}

.about-page {
  --about-left-lane-start: clamp(92px, 7.7vw, 148px);
  --about-left-width: clamp(380px, 31vw, 560px);
  --about-center-lane: clamp(252px, 18.5vw, 392px);
  --about-right-width: clamp(430px, 32vw, 660px);
  min-height: 100vh;
  background-color: #fcfbf8;
}

.about-page::after {
  background: linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82));
  background-size: auto;
  mask-image: none;
  opacity: 1;
}

.about-main {
  width: 100%;
  min-height: 100vh;
  padding: 132px 30px 36px;
  color: var(--text);
}

.about-layout {
  display: grid;
  grid-template-columns:
    var(--about-left-lane-start)
    var(--about-left-width)
    var(--about-center-lane)
    minmax(0, var(--about-right-width))
    minmax(24px, 1fr);
  gap: 0;
  align-items: start;
  width: 100%;
  max-width: none;
  margin: 0;
}

.about-story {
  position: fixed;
  top: 166px;
  left: var(--about-left-lane-start);
  width: var(--about-left-width);
  padding-top: 0;
}

.about-summary {
  max-width: 31ch;
  margin: 0;
  color: var(--text);
  font-family: var(--ui-font);
  font-size: clamp(20px, 1.85vw, 30px);
  font-weight: 400;
  letter-spacing: calc(var(--tracking-tight) - 0.01em);
  line-height: 1.14;
}

.about-summary strong {
  color: var(--text);
  font-weight: 400;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.about-cta {
  display: inline-block;
  padding: 0;
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 180ms ease, opacity 180ms ease;
}

.about-cta:hover,
.about-cta:focus-visible {
  color: var(--text);
}

.about-cta:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.about-rail {
  display: grid;
  gap: 42px;
  grid-column: 4;
  justify-self: start;
  width: 100%;
  max-width: var(--about-right-width);
  padding-top: 34px;
  transform: translateX(62px);
}

.about-section h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.about-entry-list,
.about-detail-list {
  display: grid;
}

.about-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 0 19px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.about-entry:last-child,
.about-detail-row:last-child {
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.about-entry__copy {
  display: grid;
  gap: 6px;
  max-width: 42ch;
}

.about-entry__title,
.about-entry__role,
.about-entry__meta,
.about-entry__summary,
.about-detail-label,
.about-detail-value {
  margin: 0;
  font-family: var(--ui-font);
}

.about-entry__title {
  color: var(--text);
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 400;
  letter-spacing: calc(var(--tracking-tight) - 0.004em);
  line-height: 0.98;
}

.about-entry__role,
.about-entry__meta,
.about-entry__summary,
.about-detail-label,
.about-detail-value {
  color: var(--text);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1.16;
}

.about-entry__summary {
  max-width: 40ch;
}

.about-entry__meta {
  justify-self: end;
  white-space: nowrap;
  text-align: right;
}

.about-detail-row {
  display: grid;
  grid-template-columns: minmax(152px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0 19px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.site-signature--about {
  color: var(--text);
}

@media (max-width: 1100px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .about-story {
    position: static;
    top: auto;
    left: auto;
    width: min(100%, 620px);
    padding-top: 34px;
    transform: none;
  }

  .about-rail {
    grid-column: auto;
    justify-self: center;
    width: min(100%, 620px);
    max-width: none;
    transform: none;
  }

  .about-summary {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .about-main {
    padding: 88px 16px 32px;
  }

  .about-layout {
    gap: 40px;
  }

  .about-story {
    width: 100%;
    padding-top: 8px;
  }

  .about-rail {
    grid-column: auto;
    justify-self: center;
    width: 100%;
    max-width: none;
    transform: none;
  }

  .about-summary {
    max-width: none;
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.18;
  }

  .about-actions {
    margin-top: 20px;
  }

  .about-rail {
    gap: 32px;
  }

  .about-entry {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 0;
  }

  .about-entry__meta {
    justify-self: start;
    text-align: left;
  }

  .about-detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 0;
  }

  .site-signature--about {
    display: none;
  }
}

/* Work page - Merrell inspired project layout */
.project-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #ffffff;
}

.project-page::before {
  display: block;
}

.project-page::after {
  background: linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84));
  background-size: auto;
  mask-image: none;
  opacity: 1;
}

.project-page.is-project-loading #nav-placeholder,
.project-page.is-project-loading .work-page {
  visibility: hidden;
  pointer-events: none;
}

.project-loading-screen {
  --project-loader-width: min(36vw, 288px);
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--nav-muted);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}

.project-page.is-project-loading .project-loading-screen {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.project-loading-screen__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: var(--project-loader-width);
  max-width: 100%;
  margin: 0 0 8px;
  gap: 18px;
}

.project-loading-screen__title,
.project-loading-screen__progress {
  margin: 0;
  color: inherit;
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: 400;
  line-height: 0.96;
  opacity: 0.8;
}

.project-loading-screen__title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.project-loading-screen__progress {
  flex: 0 0 auto;
  text-align: right;
}

.project-loading-screen__preview {
  display: grid;
  place-items: center;
  width: var(--project-loader-width);
  max-width: 100%;
  margin: 0;
}

.project-loading-screen__preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(48vh, 368px);
  object-fit: contain;
}

.project-loading-screen__preview img[hidden] {
  display: none;
}

.work-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  color: var(--text);
}

.work-visit,
.work-rail button {
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  transition: color 180ms ease, opacity 180ms ease;
}

.work-visit {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.work-visit:hover,
.work-visit:focus-visible,
.work-rail button:hover,
.work-rail button:focus-visible,
.work-rail button.is-active {
  color: var(--nav-name);
}

.work-visit:focus-visible,
.work-rail button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.work-layout {
  --work-top-gap: 82px;
  --work-side-gap: 30px;
  --work-bottom-gap: 30px;
  --work-row-gap: 12px;
  --work-title-band: clamp(76px, 10vh, 112px);
  --work-horizontal-band: clamp(206px, 23.625vw, 454px);
  --work-vertical-safe-gap: clamp(22px, 3vh, 40px);
  --work-vertical-max-height: calc(100vh - var(--work-top-gap) - var(--work-bottom-gap) - var(--work-vertical-safe-gap));
  --work-vertical-max-height: calc(100dvh - var(--work-top-gap) - var(--work-bottom-gap) - var(--work-vertical-safe-gap));
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 42vw) minmax(86px, 8vw) minmax(520px, 1fr) max-content;
  grid-template-rows:
    max(0px, calc(100% - var(--work-horizontal-band) - var(--work-row-gap)))
    var(--work-horizontal-band);
  column-gap: clamp(30px, 4.6vw, 96px);
  row-gap: var(--work-row-gap);
  align-items: start;
  width: 100%;
  height: 100%;
  padding: var(--work-top-gap) var(--work-side-gap) var(--work-bottom-gap);
  overflow: hidden;
}

.work-layout.is-single-image {
  grid-template-columns: minmax(360px, 42vw) minmax(520px, 1fr) max-content;
}

.work-hero {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: flex-end;
  align-self: end;
  justify-self: stretch;
  margin: 0;
  overflow: hidden;
  background: #eeeeee;
}

.work-hero :is(img, video) {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-hero :is(img, video)[hidden] {
  display: none !important;
}

.work-hero.is-ready :is(img, video) {
  opacity: 1;
  transform: translateY(0);
}

.work-hero.is-horizontal {
  width: 100%;
  height: 100%;
}

.work-hero.is-horizontal :is(img, video) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-hero.is-vertical {
  width: min(88%, 520px);
  height: auto;
  max-height: var(--work-vertical-max-height);
  overflow: visible;
  background: transparent;
  justify-self: start;
}

.work-hero.is-vertical :is(img, video) {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: var(--work-vertical-max-height);
  object-fit: contain;
  object-position: left bottom;
}

.work-rail {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  display: grid;
  align-content: end;
  height: min(34vh, 320px);
  overflow: visible;
}

.work-rail[hidden] {
  display: none;
}

.work-rail__track {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.work-rail button {
  --thumb-width: 102px;
  --thumb-height: 58px;
  position: relative;
  width: var(--thumb-width);
  height: var(--thumb-height);
  padding: 0;
  overflow: hidden;
  opacity: 0.45;
  background: #eeeeee;
  cursor: pointer;
  transition: opacity 180ms ease, filter 180ms ease;
}

.work-rail button.is-active {
  opacity: 1;
}

.work-rail button.is-vertical {
  --thumb-width: 72px;
  --thumb-height: 108px;
}

.work-rail button:hover,
.work-rail button:focus-visible {
  opacity: 0.72;
}

.work-rail :is(img, video) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  filter: grayscale(1) contrast(0.72) brightness(0.94);
  transition: filter 180ms ease;
}

.work-rail button.is-active :is(img, video) {
  filter: grayscale(0) contrast(1) brightness(1);
}

.work-copy {
  grid-column: 3 / 5;
  grid-row: 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-bottom: var(--work-title-band);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1.16;
}

.work-layout.is-single-image .work-copy {
  grid-column: 2 / 4;
}

.work-intro {
  max-width: none;
  margin: 0 0 24px;
  color: var(--text);
  text-align: justify;
}

.work-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 54px);
  width: 100%;
  max-width: none;
}

.work-text-block h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.work-text-block p {
  margin: 0;
  text-align: justify;
}

.work-visit {
  display: inline-block;
  margin-top: 28px;
  color: var(--text);
}

.work-visit[hidden] {
  display: none;
}

.work-title {
  grid-column: 3;
  grid-row: 2;
  max-width: none;
  margin: 0;
  align-self: end;
  color: var(--text);
  font-family: var(--ui-font);
  font-size: clamp(26px, 2.6vw, 42px);
  font-weight: 400;
  letter-spacing: calc(var(--tracking-tight) - 0.016em);
  line-height: 0.88;
  white-space: nowrap;
}

.work-layout.is-single-image .work-title {
  grid-column: 2;
}

.work-year {
  grid-column: 4;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  margin: 0 0 6px;
  color: var(--text);
  font-family: var(--ui-font);
  font-size: clamp(12px, 0.95vw, 15px);
  font-weight: var(--ui-weight);
  line-height: 1;
}

.work-layout.is-single-image .work-year {
  grid-column: 3;
}

@media (max-width: 1100px) {
  .work-layout {
    grid-template-columns: minmax(300px, 42vw) minmax(72px, 10vw) minmax(300px, 1fr);
    column-gap: clamp(22px, 4vw, 48px);
  }

  .work-layout.is-single-image {
    grid-template-columns: minmax(300px, 42vw) minmax(300px, 1fr) max-content;
  }

  .work-copy,
  .work-title {
    grid-column: 3;
  }

  .work-year {
    grid-column: 3;
    justify-self: end;
  }

  .work-title {
    font-size: clamp(22px, 3.2vw, 34px);
  }

  .work-text-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .project-page {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .project-page.is-project-loading {
    overflow: hidden;
  }

  .project-loading-screen {
    --project-loader-width: min(68vw, 252px);
    padding: 24px 16px;
  }

  .work-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .work-layout {
    --work-top-gap: 76px;
    --work-bottom-gap: 32px;
    --work-vertical-safe-gap: 18px;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    grid-template-rows: minmax(240px, 52vh) auto auto;
    gap: 16px;
    padding: 76px 16px 32px;
    overflow: visible;
  }

  .work-hero {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
  }

  .work-hero.is-horizontal {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }

  .work-hero.is-vertical {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(100%, var(--work-vertical-max-height));
    align-self: end;
    overflow: visible;
    aspect-ratio: auto;
  }

  .work-hero.is-vertical :is(img, video) {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(100%, var(--work-vertical-max-height));
    object-fit: contain;
  }

  .work-rail {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    height: 100%;
    overflow: visible;
  }

  .work-rail button,
  .work-rail button.is-vertical {
    --thumb-width: 58px;
    --thumb-height: 42px;
  }

  .work-copy {
    grid-column: 1 / 3;
    grid-row: 3;
    align-self: start;
    margin: 0;
    padding-bottom: 0;
    max-height: none;
    overflow: visible;
  }

  .work-intro {
    margin-bottom: 16px;
  }

  .work-text-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .work-visit {
    margin-top: 18px;
  }

  .work-title {
    grid-column: 1;
    grid-row: 2;
    font-size: clamp(21px, 7vw, 30px);
    white-space: nowrap;
  }

  .work-year {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 5px;
    font-size: 12px;
  }
}

/* Admin */
body.admin-page {
  background-color: #fbfaf7;
}

body.admin-page::after {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.94) 0, rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle at 80% 32%, rgba(247, 244, 238, 0.92) 0, rgba(247, 244, 238, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(250, 247, 241, 0.92));
  mask-image: none;
  opacity: 0.82;
}

.admin-gate,
.admin-protected[hidden] {
  display: none;
}

html:not(.admin-authenticated) .admin-gate {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  padding: 24px;
}

html:not(.admin-authenticated) .admin-protected {
  display: none;
}

html.admin-authenticated .admin-gate {
  display: none;
}

.admin-gate__card {
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid rgba(5, 5, 5, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-main {
  width: min(1180px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 104px 0 56px;
}

.admin-shell {
  display: grid;
  gap: 24px;
}

.admin-hero {
  max-width: 640px;
}

.admin-kicker,
.admin-summary,
.admin-card__copy,
.admin-field__label,
.admin-feedback,
.admin-empty,
.admin-project-item__meta,
.admin-project-item__summary,
.admin-inline-code {
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
}

.admin-kicker,
.admin-card__copy,
.admin-project-item__meta {
  margin: 0;
  color: rgba(5, 5, 5, 0.6);
}

.admin-title,
.admin-card__title,
.admin-project-item__title {
  margin: 0;
  font-family: var(--ui-font);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: 0.94;
  color: #050505;
}

.admin-card__title,
.admin-project-item__title {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1;
}

.admin-summary {
  margin: 8px 0 0;
  color: rgba(5, 5, 5, 0.84);
}

.admin-card,
.admin-panel {
  border: 1px solid rgba(5, 5, 5, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-card {
  padding: 22px;
  min-width: 0;
}

.admin-panel {
  display: grid;
  gap: 24px;
  padding: 22px;
}

.admin-card__header,
.admin-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-form {
  display: grid;
  gap: 16px;
}

.admin-form__grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

.admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: start;
}

.admin-form__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field__label {
  color: rgba(5, 5, 5, 0.76);
}

.admin-input {
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid rgba(5, 5, 5, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  color: #050505;
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.admin-input:focus {
  border-color: rgba(5, 5, 5, 0.52);
  background: #ffffff;
}

.admin-input--file {
  padding: 9px 12px;
}

.admin-textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #050505;
  background: #050505;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--ui-font);
  font-size: var(--ui-size);
  font-weight: var(--ui-weight);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.admin-button:hover,
.admin-button:focus-visible {
  background: rgba(5, 5, 5, 0.84);
}

.admin-button--ghost {
  background: transparent;
  color: #050505;
}

.admin-button--ghost:hover,
.admin-button--ghost:focus-visible {
  background: rgba(5, 5, 5, 0.06);
}

.admin-feedback {
  min-height: 16px;
  margin: 0;
  color: rgba(5, 5, 5, 0.62);
}

.admin-feedback.is-error {
  color: #8a2020;
}

.admin-feedback.is-success {
  color: #195c34;
}

.admin-inline-code {
  display: inline-block;
  padding: 1px 6px 2px;
  background: rgba(5, 5, 5, 0.06);
  color: #050505;
}

.admin-project-list {
  display: grid;
  gap: 12px;
}

.admin-project-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(5, 5, 5, 0.08);
}

.admin-project-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-project-item__preview {
  aspect-ratio: 1 / 1.2;
  width: 100%;
  object-fit: cover;
  background: rgba(5, 5, 5, 0.04);
}

.admin-project-item__content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.admin-project-item__header {
  display: grid;
  gap: 4px;
}

.admin-project-item__summary {
  margin: 0;
  color: rgba(5, 5, 5, 0.82);
}

.admin-project-item__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-empty {
  margin: 0;
  color: rgba(5, 5, 5, 0.62);
}

@media (max-width: 920px) {
  .admin-main {
    width: min(100vw - 32px, 1180px);
    padding-top: 88px;
  }

  .admin-form__grid {
    grid-template-columns: 1fr;
  }

  .admin-panel__header,
  .admin-card__header {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-gate__card {
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .admin-main {
    width: calc(100vw - 24px);
    padding-top: 82px;
    padding-bottom: 32px;
  }

  .admin-card,
  .admin-panel {
    padding: 16px;
  }

  .admin-project-item {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }

  .admin-actions,
  .admin-project-item__actions {
    align-items: stretch;
  }
}
