@font-face {
  font-family: "Kurdis";
  src: url("../Fonts/KurdisVariableFamilyTest-ExtraWideExtraBold-BF64bf41e13a4b4.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Kurdis Bold";
  src: url("../Fonts/KurdisVariableFamilyTest-Bold-BF64bf41dfbff9f.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Condensed";
  src: url("../Fonts/Helvetica\ Condensed\ Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Akkurat Mono";
  src: url("../Fonts/AkkuratMono.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "display";
  src: url("../Fonts/PPEditorialNew-UltralightItalic-BF644b214ff1e9b.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "display-bold";
  src: url("../Fonts/PPEditorialNew-Ultralight-BF644b21500d0c0.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --project-paper: #f6f5f1;
  --project-ink: #171715;
  --project-muted: #85847f;
  --project-gutter: clamp(5px, 0.55vw, 9px);
  --h1: "Kurdis";
  --kb: "Kurdis Bold";
  --hc: "Helvetica Condensed";
  --am: "Akkurat Mono";
  --display: "display";
  --display-bold: "display-bold";
  font-family: Arial, Helvetica, sans-serif;
  color: var(--project-ink);
  background: var(--project-paper);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --project-paper: #191b20;
  --project-ink: #f3f4ee;
  --project-muted: #b0b1b2;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body.project-page {
  margin: 0;
  background: var(--project-paper);
  color: var(--project-ink);
  -webkit-font-smoothing: antialiased;
}

.project-topbar {
  min-height: 42px;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  line-height: 1.2;
}

.project-topbar__title {
  min-width: 0;
}

.project-topbar__title span {
  color: var(--project-muted);
}

.project-topbar__actions {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.project-topbar a {
  text-decoration: none;
  color: inherit;
  font-family: var(--display-bold), 'Times New Roman', serif;
  font-size: 1.4rem;

}

.project-topbar a:nth-child(2) {
  color: var(--pink);
}

.project-topbar a:hover {
  opacity: 0.55;
}

.project-website-link {
  display: inline-block;
  margin-top: 1rem;
  background: var(--project-paper);
  color: var(--project-ink);
  font-family: var(--display-bold), 'Times New Roman', serif;
  font-size: 1.4rem;
  line-height: normal;
  text-decoration: none;
  transition: opacity 250ms ease;
}

.project-website-link:hover {
  opacity: .55;
}

.project-website-arrow {
  display: inline-block;
  margin-left: .35em;
  font-size: .8rem;
  line-height: 1;
  transition: transform .4s cubic-bezier(.2, .75, .25, 1);
}

.project-website-link:hover .project-website-arrow,
.project-website-link:focus-visible .project-website-arrow {
  transform: translateX(-3px);
}

.project-website-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--project-gutter);
  min-width: 0;
  max-width: 820px;
  margin-inline: auto;
  padding: 0 12px;
}

.gallery__item {
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.55 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #e8e7e2;
  cursor: zoom-in;
}

.gallery__item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 2.25 / 1;
}

.gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.2, .7, .2, 1);
}

.gallery__item:hover img {
  transform: scale(1.025);
}

.gallery__item:focus-visible,
.project-topbar a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.project-detail__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.42fr);
  gap: 24px;
  padding: clamp(12px, 2vw, 28px) clamp(18px, 5vw, 76px) 80px;
}

.project-detail__number {
  margin: 0 0 18px;
  color: var(--project-muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project-detail h1 {
  margin: 0;
  width: fit-content;
  max-width: 100%;
  padding-bottom: .1em;
  border-bottom: 1px solid rgba(23, 23, 21, .35);
  font-family: var(--display), sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: .8;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

.project-detail__desc {
  margin: .5rem 0 0;
  font-family: var(--hc), sans-serif;
}

.project-detail__aside {
  align-self: end;
  justify-self: end;
  max-width: 68ch;
  width: 100%;
  color: var(--project-ink);
  font-family: inherit;
}

.project-detail__aside p {
  margin: 0;
  color: inherit;
  font-family: var(--hc), sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  text-transform: none;
}

.project-detail__aside p+p {
  margin-top: 10px;
  color: var(--project-muted);
}

@media (max-width: 900px) {
  .project-detail__info {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-detail__aside {
    align-self: start;
    justify-self: start;
  }
}

@media (min-width: 901px) {
  .project-detail__info {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(240px, .42fr);
    column-gap: clamp(48px, 7vw, 120px);
    padding-inline: clamp(18px, 5vw, 76px);
    padding-right: max(0px, calc(50vw - 398px));
  }

  .project-detail__aside {
    justify-self: end;
    align-self: start;
    text-align: left;
    margin-top: 20px;
    width: 300px;
  }
}

.lightbox {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(12, 12, 11, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: none;
  color: white;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
}

@media (min-width: 641px) {
  .project-topbar a {
    font-size: 1.2rem;
  }
}

@media (max-width: 640px) {
  .project-topbar {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 12px;
  }

  .project-topbar__actions {
    gap: 9px;
  }

  .gallery {
    padding: 0 6px;
    gap: 4px;
  }

  .gallery__item {
    aspect-ratio: 1 / 1;
  }

  .gallery__item--wide {
    aspect-ratio: 1.35 / 1;
  }

  .project-detail__info {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 18px 56px;
  }

  .project-detail__desc {
    margin-top: .2rem;
  }

  .project-detail h1 {
    width: 100%;
    min-width: 0;
    font-size: clamp(2.2rem, 5.5vw, 2.2rem);
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: .95;
  }

  .project-detail__aside {
    justify-self: stretch;
    max-width: none;
  }

}

@media (max-width: 600px) {
  .project-detail__aside p {
    font-size: 1.2rem;
    line-height: 1.2;
  }
}

@media (min-width: 641px) {
  .gallery__item {
    height: clamp(150px, 16vw, 220px);
    aspect-ratio: auto;
  }

  .gallery__item--wide {
    height: clamp(180px, 20vw, 270px);
    aspect-ratio: auto;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
