/* =========================
   RESET & BASE
========================= */

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

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

:root {
  --site-ref-w: 1920px;
  --site-scale: clamp(0.75, 100vw / var(--site-ref-w), 1.333);
  --header-offset: calc(5.5rem * var(--site-scale, 1));
  --work-content-max: min(calc(100rem * var(--site-scale, 1)), 94vw);
  --work-media-radius: calc(1.25rem * var(--site-scale, 1));
}

body.work-body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background-color: #efefdd;
  font-family: "Nunito", sans-serif;
  padding-top: var(--header-offset);
}

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

.header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: calc(0.2rem * var(--site-scale, 1)) calc(4rem * var(--site-scale, 1))
    calc(0.7rem * var(--site-scale, 1)) 0;
  box-sizing: border-box;
  background: linear-gradient(to right, #bbdb95, #009ea4);
  z-index: 1000;
}

.nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(3rem * var(--site-scale, 1));
  list-style: none;
}

.nav a {
  display: inline-block;
  font-size: calc(1.8rem * var(--site-scale, 1));
  font-weight: 650;
  text-decoration: none;
  color: #efefdd;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav a:hover {
  color: #d5e7b4;
  transform: scale(1.08);
}

.nav a:focus-visible {
  color: #d5e7b4;
  outline: 2px solid #efefdd;
  outline-offset: 0.2rem;
}

.header::before {
  content: "";
  position: absolute;
  bottom: calc(0.5rem * var(--site-scale, 1));
  left: 0;
  width: 100%;
  height: calc(0.3rem * var(--site-scale, 1));
  background: #bbdb95;
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(0.5rem * var(--site-scale, 1));
  background: #009ea4;
}

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

.work-title-wrapper {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 10;
}

.star-icon {
  width: auto;
  height: calc(8rem * var(--site-scale, 1));
  flex-shrink: 0;
  margin-right: calc(-5.5rem * var(--site-scale, 1));
  z-index: 2;
}

.work-title {
  margin: 0;
  background-color: #efefdd;
  border: calc(9px * var(--site-scale, 1)) solid #009ea4;
  border-radius: 999px;
  padding: calc(0.75rem * var(--site-scale, 1))
    calc(8rem * var(--site-scale, 1));
  color: #009ea4;
  font-family: "Nunito", sans-serif;
  font-size: calc(4rem * var(--site-scale, 1));
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background-image:
    linear-gradient(to left, #efefdd 20%, transparent 80%),
    radial-gradient(#d5e7b4 30%, transparent 50%);
  background-size:
    100% 100%,
    calc(20px * var(--site-scale, 1)) calc(20px * var(--site-scale, 1));
  background-repeat: no-repeat, repeat;
}

/* =========================
   WORK PAGE LAYOUT
========================= */

.work-page {
  flex: 1 1 auto;
  position: relative;
  width: 100%;
}

.work-page-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: var(--work-content-max);
  margin: 0 auto;
  padding: calc(4rem * var(--site-scale, 1)) calc(2rem * var(--site-scale, 1))
    calc(3rem * var(--site-scale, 1));
  box-sizing: border-box;
}

.work-page-content {
  width: 100%;
  max-width: var(--work-content-max);
  margin: 0 auto;
  padding: 0 calc(2rem * var(--site-scale, 1)) calc(5rem * var(--site-scale, 1));
  box-sizing: border-box;
}

.work-page-content img {
  display: block;
  box-sizing: border-box;
  width: var(--work-img-width, 100%);
  max-width: min(100%, var(--work-img-width, 100%));
  height: auto;
  aspect-ratio: var(--work-img-aspect, auto);
  object-fit: var(--work-img-fit, contain);
  margin-top: calc(2rem * var(--site-scale, 1));
  margin-bottom: calc(2.5rem * var(--site-scale, 1));
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--work-media-radius);
}

.work-page-content .work-media-frame--inline {
  flex: none;
  width: 100%;
  max-width: 100%;
  margin-top: calc(2.5rem * var(--site-scale, 1));
  margin-bottom: calc(3rem * var(--site-scale, 1));
  margin-left: auto;
  margin-right: auto;
}

.work-page-content .work-media-frame--inline video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  vertical-align: top;
}

.work-embed {
  width: 100%;
  max-width: 100%;
  margin-top: calc(2.5rem * var(--site-scale, 1));
  margin-bottom: calc(3rem * var(--site-scale, 1));
  margin-left: auto;
  margin-right: auto;
  border: calc(0.5rem * var(--site-scale, 1)) solid #bbdb95;
  border-radius: var(--work-media-radius);
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  background-color: #1a1a1a;
  box-sizing: border-box;
}

.work-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
}

.work-page-content img.work-img--medium {
  --work-img-width: 72%;
}

.work-page-content img.work-img--small {
  --work-img-width: 70%;
}

.work-page-content img.work-img--natural {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.work-figure {
  margin: calc(2rem * var(--site-scale, 1)) auto
    calc(2.5rem * var(--site-scale, 1));
}

.work-figure img {
  margin-top: 0;
  margin-bottom: 0;
}

.work-figure--small {
  width: 70%;
  max-width: 70%;
}

.work-figure--small img {
  width: 100%;
  max-width: 100%;
}

.work-caption {
  margin-top: calc(0.75rem * var(--site-scale, 1));
  color: #389a39;
  font-family: "Nunito", sans-serif;
  font-size: calc(1rem * var(--site-scale, 1));
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.work-section-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(2rem * var(--site-scale, 1));
  margin-top: calc(2.5rem * var(--site-scale, 1));
  align-items: stretch;
}

.work-section-row--balanced {
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  align-items: start;
}

.work-section-row--balanced .work-section-media {
  min-height: 0;
  align-self: start;
}

.work-section-row--balanced .work-section-media > img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: fill;
}

.work-section-row--media-wide {
  grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
}

.work-section-text {
  min-width: 0;
}

.work-section-text h3:first-child {
  margin-top: 0;
}

.work-section-media {
  min-width: 0;
  min-height: 100%;
}

.work-section-media:has(.work-image-grid) {
  display: grid;
  grid-template-rows: 1fr;
  min-height: 100%;
  height: 100%;
}

.work-section-media img {
  margin-top: 0;
}

.work-section-media--fill:has(.work-media-frame),
.work-section-media--fill:has(> img:only-child) {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100%;
  height: 100%;
}

.work-media-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border-radius: var(--work-media-radius);
  overflow: hidden;
  isolation: isolate;
}

.work-media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

.work-media-frame video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.work-section-media > img:only-child {
  width: 100%;
  height: auto;
  object-fit: fill;
  border-radius: var(--work-media-radius);
}

.work-section-media--fill > img:only-child {
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  overflow: hidden;
}

.work-section-media .work-image-grid {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin-top: 0;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: calc(1.25rem * var(--site-scale, 1));
}

.work-section-media .work-image-grid img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: var(--work-media-radius);
}

@media (max-width: 768px) {
  .work-section-row {
    grid-template-columns: 1fr;
  }

  .work-section-media img {
    margin-top: calc(1rem * var(--site-scale, 1));
  }

  .work-section-media > img:only-child {
    height: auto;
    object-fit: fill;
  }

  .work-media-frame {
    height: auto;
  }

  .work-media-frame img {
    height: auto;
    object-fit: fill;
  }

  .work-section-media:has(.work-image-grid) {
    display: block;
  }

  .work-section-media .work-image-grid {
    flex: none;
    height: auto;
    margin-top: calc(1rem * var(--site-scale, 1));
    grid-template-rows: none;
  }

  .work-section-media .work-image-grid img {
    height: auto;
    margin-top: 0;
    object-fit: fill;
  }
}

.work-image-row {
  display: flex;
  align-items: flex-start;
  gap: var(--work-image-gap, calc(1rem * var(--site-scale, 1)));
  margin-top: calc(2rem * var(--site-scale, 1));
}

.work-image-row > img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: auto;
  margin-top: 0;
  margin-bottom: 0;
}

.work-image-row--matched {
  align-items: stretch;
}

.work-image-cell {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  border-radius: var(--work-media-radius);
  overflow: hidden;
}

.work-image-row--matched .work-image-cell img {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  object-fit: cover;
  object-position: center;
  border-radius: var(--work-media-radius);
}

.work-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--work-image-gap, calc(1rem * var(--site-scale, 1)));
  margin-top: calc(2rem * var(--site-scale, 1));
}

.work-image-grid img {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .work-image-row {
    flex-direction: column;
  }

  .work-image-cell {
    display: block;
  }

  .work-image-cell img {
    height: auto;
    object-fit: fill;
  }

  .work-image-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   WORK PAGE TEXT
========================= */

.work-page-content h2 {
  margin: 0;
  color: #389a39;
  font-family: "Nunito", sans-serif;
  font-size: calc(1.45rem * var(--site-scale, 1));
  font-weight: 650;
  line-height: 1.55;
}

.work-page-content p {
  margin: 0;
  color: #389a39;
  font-family: "Nunito", sans-serif;
  font-size: calc(1.3rem * var(--site-scale, 1));
  font-weight: 650;
  line-height: 1.6;
}

.work-page-content p + p {
  margin-top: calc(1.5rem * var(--site-scale, 1));
}

.work-page-content h3 {
  margin: calc(2.5rem * var(--site-scale, 1)) 0 0;
  color: #009ea4;
  font-family: "Nunito", sans-serif;
  font-size: calc(1.6rem * var(--site-scale, 1));
  font-weight: 700;
  line-height: 1.35;
}

.work-page-content h3:first-of-type {
  margin-top: calc(2rem * var(--site-scale, 1));
}

.work-page-content h4 {
  margin: calc(1.75rem * var(--site-scale, 1)) 0 0;
  color: #389a39;
  font-family: "Nunito", sans-serif;
  font-size: calc(1.45rem * var(--site-scale, 1));
  font-weight: 700;
  line-height: 1.4;
}

.work-page-content .work-tech {
  margin-top: calc(1rem * var(--site-scale, 1));
}

.work-tech-label {
  color: #009ea4;
}

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

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(1rem * var(--site-scale, 1));
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  padding: calc(1.5rem * var(--site-scale, 1)) 0
    calc(0.65rem * var(--site-scale, 1));
  background: linear-gradient(to right, #bbdb95, #009ea4);
}

.work-project-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: calc(0.85rem * var(--site-scale, 1));
  padding: 0 0 0 calc(2rem * var(--site-scale, 1));
}

.work-project-nav__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.work-project-nav__arrow:hover {
  transform: scale(1.08);
}

.work-project-nav__arrow:focus-visible {
  outline: 2px solid #efefdd;
  outline-offset: 0.2rem;
  border-radius: 0.2rem;
}

.work-project-nav__icon {
  display: block;
  width: calc(2.5rem * var(--site-scale, 1));
  height: auto;
}

.work-project-nav__arrow--next .work-project-nav__icon {
  transform: scaleX(-1);
}

.work-project-nav__arrow--next:hover .work-project-nav__icon {
  transform: scaleX(-1);
}

.work-project-nav__current {
  color: #009ea4;
  font-family: "Nunito", sans-serif;
  font-size: calc(2rem * var(--site-scale, 1));
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(0.5rem * var(--site-scale, 1));
  background: #009ea4;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: calc(0.5rem * var(--site-scale, 1));
  left: 0;
  width: 100%;
  height: calc(0.3rem * var(--site-scale, 1));
  background: #bbdb95;
}

.site-footer p {
  margin: 0;
  margin-left: auto;
  padding: 0 calc(4rem * var(--site-scale, 1)) 0 0;
  color: #efefdd;
  font-family: "Nunito", sans-serif;
  font-size: calc(1.25rem * var(--site-scale, 1));
  font-weight: 650;
  line-height: 1.2;
  text-align: right;
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer p {
    margin-left: 0;
    padding: 0 calc(2rem * var(--site-scale, 1));
    text-align: left;
  }

  .work-project-nav {
    padding: 0 calc(2rem * var(--site-scale, 1));
    gap: calc(0.5rem * var(--site-scale, 1));
  }

  .work-project-nav__current {
    font-size: calc(1.5rem * var(--site-scale, 1));
    max-width: 50vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .work-project-nav__icon {
    width: calc(2rem * var(--site-scale, 1));
  }
}

.work-page-content h2 {
  font-weight: 650;
  font-size: calc(2rem * var(--site-scale, 1));
}

/* 
-------------elsewhere specific--------------------- */
.work-page-content img.below-hill {
  height: calc(30rem * var(--site-scale, 1));
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.work-page-content img.on-hill {
  height: calc(30rem * var(--site-scale, 1));
  width: 100%;
  object-fit: cover;
  object-position: center 70%;
}

/* -------------reachup specific--------------------- */
.work-page-content img.above-city,
.work-page-content img.sky {
  height: calc(25rem * var(--site-scale, 1));
  width: 100%;
  object-fit: cover;
  object-position: center-top;
}
