/* ==================================================
   RESET
================================================== */

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background: #F1EBDD;
  color: #211914;
  font-family: Arial, Helvetica, sans-serif;
}


/* ==================================================
   COLOUR SYSTEM
================================================== */

:root {
  --bone: #F1EBDD;
  --orange: #A94720;
  --brown: #211914;
  --dark: #18130F;
  --soft-orange: #D8B49B;
  --white: #FFFFFF;

  --grid-line: 1.5px;
  --navigation-height: 48px;
}


/* ==================================================
   GENERAL
================================================== */

button {
  font-family: inherit;
}

button,
a {
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

.page {
  display: none;
  min-height: calc(100vh - var(--navigation-height));
}

.page.active {
  display: block;
}


/* ==================================================
   WORK
================================================== */

.work-page {
  padding-bottom: var(--navigation-height);
}

.image-grid {
  position: relative;

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  /*
    The gap creates the continuous orange grid.
    Every line is exactly 1.5px.
  */
  gap: var(--grid-line);

  background: var(--orange);
}

.image-item {
  position: relative;

  width: 100%;

  aspect-ratio: 1 / 1;

  overflow: hidden;

  background: var(--bone);

  cursor: zoom-in;

  border: none;
}

.image-item.tall {
  aspect-ratio: 3 / 4;
}

.image-item.wide {
  aspect-ratio: 4 / 3;
}

.image-item img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition: transform 0.5s ease;
}

.image-item:hover img {
  transform: scale(1.025);
}


/* ==================================================
   IMAGE INFORMATION
================================================== */

.image-information {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  padding: 60px 12px 12px;

  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  color: var(--bone);

  font-size: 11px;

  background: linear-gradient(
    transparent,
    rgba(33, 25, 20, 0.8)
  );

  opacity: 0;

  transition: opacity 0.2s ease;
}

.image-item:hover .image-information {
  opacity: 1;
}


/* ==================================================
   NAVIGATION
================================================== */

.navigation {
  position: fixed;

  z-index: 100;

  left: 0;
  right: 0;
  bottom: 0;

  height: var(--navigation-height);

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  background: var(--bone);

  border-top: 1px solid var(--orange);
}

.navigation-item {
  display: flex;

  align-items: center;
  justify-content: center;

  color: var(--orange);

  font-size: 10px;

  letter-spacing: 0.12em;

  border-right: 1px solid var(--orange);

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.navigation-item:last-child {
  border-right: none;
}

.navigation-item.active {
  background: var(--orange);
  color: var(--bone);
}

.navigation-item:hover {
  background: var(--orange);
  color: var(--bone);
}


/* ==================================================
   INFO PAGE
================================================== */

.info-page {
  height: calc(100vh - var(--navigation-height));

  min-height: 0;

  overflow: hidden;
}

.info-container {
  height: 100%;

  min-height: 0;

  padding: 16px 20px;

  display: flex;

  flex-direction: column;
}


/* ==================================================
   INFO HEADER
================================================== */

.info-header {
  flex: 0 0 auto;

  display: flex;

  justify-content: space-between;

  color: var(--orange);

  font-size: 9px;

  letter-spacing: 0.08em;

  padding-bottom: 12px;

  border-bottom: 1px solid var(--orange);
}


/* ==================================================
   INFO CONTENT
================================================== */

.info-content {
  flex: 1 1 auto;

  min-height: 0;

  display: grid;

  grid-template-columns: 0.55fr 1.45fr;

  grid-template-rows: auto 1fr;

  column-gap: 4vw;

  row-gap: 20px;

  padding-top: 4vw;

  padding-bottom: 3vw;
}


/* ==================================================
   PROFILE IMAGE
================================================== */

.profile-image {
  width: 100%;

  max-width: 300px;

  aspect-ratio: 4 / 5;

  overflow: hidden;

  align-self: start;

  background: var(--soft-orange);
}

.profile-image img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}


/* ==================================================
   STATEMENT
================================================== */

.statement {
  grid-column: 2;

  grid-row: 1;

  align-self: start;
}

.statement h1 {
  max-width: 700px;

  margin: 0;

  color: var(--orange);

  font-size: clamp(
    34px,
    4.5vw,
    68px
  );

  line-height: 0.94;

  font-weight: 400;

  letter-spacing: -0.055em;
}


/* ==================================================
   DETAILS
================================================== */

.details {
  grid-column: 2;

  grid-row: 2;

  max-width: 400px;

  align-self: end;
}

.text-block {
  max-width: 370px;

  color: var(--brown);

  font-size: 13px;

  line-height: 1.4;
}

.text-block p {
  margin: 0 0 12px;
}


/* ==================================================
   CONTACT
================================================== */

.contact {
  margin-top: 35px;

  display: flex;

  flex-direction: column;

  align-items: flex-start;
}

.small-label {
  margin-bottom: 12px;

  color: var(--orange);

  font-size: 9px;

  letter-spacing: 0.1em;
}

.contact a {
  margin-bottom: 5px;

  color: var(--orange);

  font-size: 17px;

  line-height: 1;

  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}


/* ==================================================
   INFO FOOTER
================================================== */

.info-footer {
  flex: 0 0 auto;

  padding-top: 12px;

  border-top: 1px solid var(--orange);

  display: flex;

  justify-content: space-between;

  color: var(--orange);

  font-size: 9px;

  letter-spacing: 0.05em;
}


/* ==================================================
   IMAGE VIEWER
================================================== */

.viewer {
  position: fixed;

  z-index: 500;

  inset: 0;

  display: none;

  align-items: center;
  justify-content: center;

   background: rgba(241, 235, 221, 0.92);
  color: var(--brown);

  color: var(--bone);
}

.viewer.open {
  display: flex;
}

.viewer-content {
  width: min(82vw, 1200px);

  height: 88vh;

  display: flex;

  flex-direction: column;

  justify-content: center;

  margin: 0;
}

.viewer-content img {
  width: 100%;

  height: calc(100% - 35px);

  display: block;

  object-fit: contain;
}

.viewer-caption {
  height: 35px;

  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  color: var(--soft-orange);

  font-size: 10px;

  letter-spacing: 0.03em;
}


/* ==================================================
   VIEWER CLOSE
================================================== */

.viewer-close {
  position: absolute;

  z-index: 2;

  top: 12px;

  right: 18px;

  color: var(--orange);

  font-size: 34px;

  font-weight: 200;

  line-height: 1;
}

.viewer-close:hover {
  opacity: 0.5;
}


/* ==================================================
   VIEWER ARROWS
================================================== */

.viewer-arrow {
  position: absolute;

  z-index: 2;

  top: 50%;

  transform: translateY(-50%);

  padding: 30px;

  color: var(--orange);

  font-size: 26px;
}

.viewer-previous {
  left: 0;
}

.viewer-next {
  right: 0;
}

.viewer-arrow:hover {
  opacity: 0.5;
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 700px) {

  /* WORK */

  .image-grid {
    grid-template-columns: repeat(2, 1fr);

    gap: 1.5px;
  }

  .image-information {
    opacity: 1;

    padding: 45px 8px 8px;

    font-size: 9px;
  }


  /* INFO */

  .info-container {
    padding: 10px 12px;
  }

  .info-header {
    padding-bottom: 9px;

    font-size: 8px;
  }

  .info-content {
    display: grid;

    grid-template-columns: 0.75fr 1.25fr;

    grid-template-rows: auto 1fr;

    column-gap: 18px;

    row-gap: 18px;

    padding-top: 20px;

    padding-bottom: 15px;
  }

  .profile-image {
    width: 100%;

    max-width: 180px;

    aspect-ratio: 4 / 5;
  }

  .statement {
    grid-column: 2;

    grid-row: 1;
  }

  .statement h1 {
    font-size: clamp(
      25px,
      7vw,
      42px
    );

    line-height: 0.95;
  }

  .details {
    grid-column: 1 / -1;

    grid-row: 2;

    align-self: end;

    max-width: 100%;
  }

  .text-block {
    max-width: 100%;

    font-size: 11px;

    line-height: 1.35;
  }

  .text-block p {
    margin-bottom: 8px;
  }

  .contact {
    margin-top: 18px;
  }

  .small-label {
    margin-bottom: 8px;

    font-size: 8px;
  }

  .contact a {
    margin-bottom: 4px;

    font-size: 15px;
  }

  .info-footer {
    padding-top: 9px;

    font-size: 8px;
  }


  /* VIEWER */

  .viewer-content {
    width: 90vw;

    height: 82vh;
  }

  .viewer-arrow {
    padding: 15px;

    font-size: 20px;
  }

  .viewer-previous {
    left: 0;
  }

  .viewer-next {
    right: 0;
  }
}