/* ---------------------------------------------------------------
   edgaredgar.com
   Design note: the photographs are the only colour on this site.
   Everything else is black, white, and grey on purpose, so that
   nothing in the chrome competes with the work.
   --------------------------------------------------------------- */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #7a7a7a;
  --rule: #242424;
  --surface: #0e0e0e;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.25rem;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.91rem + 0.18vw, 1.05rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.5vw, 2.8rem);
  --step-3: clamp(2.6rem, 1.8rem + 4vw, 6rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Archivo", ui-sans-serif, system-ui, "Helvetica Neue", Arial, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus {
  left: 0;
}

/* --- header ---------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.masthead--floating {
  position: fixed;
  left: 0;
  right: 0;
  background: none;
  backdrop-filter: none;
  border-bottom: none;
}

.wordmark {
  font-size: var(--step-0);
  font-weight: 700;
  font-variation-settings: "wdth" 118, "wght" 700;
  letter-spacing: -0.015em;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: var(--step--1);
  color: var(--mute);
}

.nav a {
  padding-block: 0.35rem;
  transition: color 0.18s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--paper);
}

/* --- home projection ------------------------------------------- */

.projection {
  position: relative;
  height: 100svh;
  min-height: 30rem;
  overflow: hidden;
  background: var(--ink);
}

.projection__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}

.projection__frame.is-visible {
  opacity: 1;
}

.projection::after {
  /* keeps the type legible over any frame */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.05) 35%,
    rgba(0, 0, 0, 0.1) 60%,
    rgba(0, 0, 0, 0.75) 100%
  );
  pointer-events: none;
}

.projection__plate {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(2rem, 6vh, 4.5rem);
  z-index: 2;
}

.projection__name {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 700;
  font-variation-settings: "wdth" 125, "wght" 700;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: none;
}

.projection__role {
  margin: 0.9rem 0 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--step-0);
}

.projection__enter {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.6rem;
  font-size: var(--step--1);
}

.projection__enter a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 0.2rem;
  transition: border-color 0.18s ease;
}

.projection__enter a:hover {
  border-color: var(--paper);
}

/* --- generic page shell ---------------------------------------- */

.page {
  padding: clamp(3rem, 8vh, 6rem) var(--gutter) clamp(4rem, 10vh, 7rem);
}

.page--flush {
  padding-inline: 0;
}

.page__title {
  margin: 0 0 0.5rem;
  font-size: var(--step-2);
  font-weight: 700;
  font-variation-settings: "wdth" 118, "wght" 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.page__intro {
  margin: 0 0 clamp(2.5rem, 6vh, 4rem);
  max-width: 58ch;
  color: var(--mute);
}

.page--flush .page__title,
.page--flush .page__intro {
  padding-inline: var(--gutter);
}

/* --- video ------------------------------------------------------ */

.reel {
  display: grid;
  gap: clamp(3rem, 8vh, 5.5rem);
}

.project {
  display: grid;
  gap: 1rem;
}

.project__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  overflow: hidden;
}

.project__media iframe,
.project__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.project__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.4rem;
  text-align: center;
  color: var(--mute);
  font-size: var(--step--1);
  border: 1px dashed var(--rule);
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding-inline: var(--gutter);
}

.project__name {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 600;
  font-variation-settings: "wdth" 112, "wght" 600;
  letter-spacing: -0.02em;
}

.project__credit {
  margin: 0;
  color: var(--mute);
  font-size: var(--step--1);
}

/* --- photography grid ------------------------------------------- */

.contact-sheet {
  columns: 1;
  column-gap: 2px;
  padding-inline: 0;
}

@media (min-width: 40rem) {
  .contact-sheet {
    columns: 2;
  }
}

@media (min-width: 64rem) {
  .contact-sheet {
    columns: 3;
  }
}

@media (min-width: 100rem) {
  .contact-sheet {
    columns: 4;
  }
}

.frame {
  display: block;
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  background: var(--surface);
  break-inside: avoid;
  cursor: zoom-in;
  line-height: 0;
}

.frame img {
  width: 100%;
  transition: opacity 0.25s ease;
}

.frame:hover img {
  opacity: 0.78;
}

/* --- lightbox ---------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.96);
  padding: clamp(1rem, 4vh, 3rem);
}

.lightbox[open],
.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox__btn {
  position: absolute;
  background: none;
  border: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.18s ease;
}

.lightbox__btn:hover {
  opacity: 1;
}

.lightbox__btn--close {
  top: 0.5rem;
  right: 0.75rem;
}
.lightbox__btn--prev {
  left: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__btn--next {
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--mute);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

/* --- about ------------------------------------------------------- */

.about {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 56rem) {
  .about {
    grid-template-columns: minmax(0, 20rem) minmax(0, 34rem);
  }
}

.about__portrait {
  width: 100%;
  background: var(--surface);
}

.about__body p {
  max-width: 62ch;
}

.credits {
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.75rem;
}

.credits h2 {
  margin: 0 0 0.35rem;
  font-size: var(--step-0);
  font-weight: 600;
  font-variation-settings: "wdth" 112, "wght" 600;
}

.credits p,
.credits ul {
  margin: 0;
  color: var(--mute);
  max-width: 58ch;
}

.credits ul {
  padding-left: 1.1rem;
}

/* --- footer ------------------------------------------------------ */

.foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--step--1);
  color: var(--mute);
}

.foot a:hover {
  color: var(--paper);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* --- motion preferences ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
