/* Shared colours and spacing, followed by page components and responsive layouts. */
:root {
  --paper: #edede9;
  --ink: #000;
  --muted: #a8a8a3;
  --gutter: clamp(22px,4vw,76px);
  --content-column: min(560px, calc(100vw / 3 - 32px));
  --content-gap: calc(100vw / 3 - var(--content-column));
  --content-inset: calc(100vw / 3 - var(--content-column) / 2);
  --font: 'Space Grotesk',Arial,sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  touch-action: manipulation;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
video:focus-visible {
  outline: 2px solid #c7ff69;
  outline-offset: 6px;
}

figure,
h1,
h2,
p {
  margin: 0;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 16px;
}

.skip-link:focus {
  top: 12px;
}

/* Header, navigation button, and floating contact link. */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
  z-index: 5;
  gap: 20px;
}

.wordmark {
  font-size: clamp(40px,4vw,56px);
  max-width: calc(100% - 110px);
  font-weight: 500;
  letter-spacing: -.06em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 36px;
}

.contact-link {
  position: fixed;
  right: 30px;
  bottom: max(24px,env(safe-area-inset-bottom));
  z-index: 8;
  display: block;
  background: #000;
  color: var(--paper);
  padding: 12px 18px;
  font-size: 26px;
  line-height: 1.2;
}

.contact-link:hover {
  background: #292929;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #000;
  border: 0;
  border-radius: 0;
  min-height: 48px;
  padding: 10px 20px;
  font-size: 14px;
  position: fixed;
  right: var(--gutter);
  top: 24px;
  z-index: 10;
}

.hamburger {
  position: relative;
  width: 22px;
  height: 12px;
  border-top: 1px solid;
  border-bottom: 1px solid;
}

.menu-toggle:hover {
  background: #333;
}

.eyebrow,
.index,
.section-heading>span,
.dialog-top,
.menu-contact {
  font-size: 14px;
  font-weight: 400;
}

.eyebrow {
  display: block;
  line-height: 1.5;
}

/* Full-height covers. Crop media instead of adding letterboxing. */
.image-stage {
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 660px;
  overflow: hidden;
}

.image-stage>img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.image-stage:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,#0007 0%,transparent 36%,#0002 55%,#000b 100%);
  z-index: -1;
}

.image-title {
  position: absolute;
  bottom: 32px;
  left: var(--gutter);
  right: var(--gutter);
}



/* Project descriptions and supporting image grids. */
.project-intro {
  padding: 100px var(--gutter) 80px;
  display: flex;
  gap: 8vw;
  justify-content: flex-end;
}

.project-copy {
  font-size: clamp(16px,1.25vw,20px);
  line-height: 1.65;
  max-width: 65ch;
  color: #bdbdb8;
}

.project-copy p+p {
  margin-top: 24px;
}

.image-pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  padding: 0 var(--gutter) 80px;
}

.image-pair img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  height: 100%;
}

.film {
  margin: 0 0 100px;
}

.portfolio-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  object-fit: contain;
}

.video-pair {
  grid-template-columns: repeat(auto-fit, var(--video-native-width, 512px));
  justify-content: space-evenly;
}

.video-pair .portfolio-video {
  width: var(--video-native-width, 512px);
  height: var(--video-native-height, 1024px);
  max-height: none;
}

/* Portrait players fit the screen with a little breathing room on each side. */
.portrait-film .portfolio-video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(900px, calc(100svh - 48px));
  margin-inline: auto;
}

.trencin-stage {
  height: 100svh;
}

.trencin-stage>img {
  object-position: center;
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 60px 8vw;
  padding: 100px var(--gutter) 120px;
  align-items: start;
}

.editorial-grid .project-copy {
  grid-column: 2;
  grid-row: 1;
}

.editorial-grid figure {
  grid-column: 1;
  grid-row: 1;
}

.editorial-grid figure img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Text-only projects share the same black page background. */
.archive {
  background: var(--ink);
  color: var(--paper);
  padding: 70px var(--gutter) 100px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding-bottom: 40px;
  border-bottom: 1px solid #ffffff40;
}

.section-heading h2 {
  font-weight: 400;
  font-size: clamp(36px,6vw,88px);
  letter-spacing: -.065em;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 7vw;
}

.archive-work {
  padding: 42px 0 50px;
  border-bottom: 1px solid #ffffff30;
  scroll-margin-top: 20px;
  min-width: 0;
}



.archive-work .project-copy {
  color: #bdbdb8;
  font-size: 16px;
}

.archive-work:target h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

.archive-work .index {
  color: var(--muted);
}

/* Accessible full-screen works menu. */
dialog {
  color: var(--paper);
  background: var(--ink);
  border: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
}

dialog::backdrop {
  background: #000a;
}

.works-menu {
  width: 100%;
  height: 100dvh;
  overflow: auto;
  padding: 28px var(--gutter) 40px;
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
}

.close-button {
  background: transparent;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  padding: 8px 0;
}

.close-button span {
  font-size: 30px;
  font-weight: 300;
}

.works-menu nav {
  margin: 52px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 6vw;
}

.works-menu nav a {
  border-top: 1px solid #ffffff30;
  padding: 20px 0;
  display: flex;
  align-items: baseline;
  gap: 24px;
  font-size: clamp(20px,2.4vw,38px);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.works-menu nav a:hover,
.works-menu nav a[aria-current] {
  color: #c7ff69;
}

.works-menu .index {
  color: var(--muted);
  letter-spacing: 0;
}

.menu-contact {
  display: inline-block;
  border-bottom: 1px solid #ffffff55;
  padding: 8px 0;
}

body.dialog-open {
  overflow: hidden;
}

html:has(body.dialog-open) {
  overflow: hidden;
}

body.dialog-open .contact-link {
  visibility: hidden;
}

/* Video posts and mixed image/text layouts. */
.project-notes {
  padding: 70px var(--gutter);
  display: flex;
  justify-content: flex-end;
}

.project-notes .project-copy {
  width: min(100%,850px);
  max-width: 75ch;
}

.video-project-heading {
  padding: 70px var(--gutter) 36px;
}



.video-project-heading+.film {
  margin-bottom: 0;
}

.panorama-stage {
  height: 70svh;
  min-height: 460px;
}

.panorama-stage>img {
  object-fit: cover;
}



.music-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 6vw;
  padding: 0 var(--gutter) 60px;
  align-items: start;
}

.music-layout .film {
  margin: 0;
}

.featured-work>.film:last-child {
  margin-bottom: 70px;
}

.project-notes.notes-with-image,
.project-notes.notes-with-video {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.15fr);
  align-items: start;
  gap: 6vw;
}

.notes-with-image figure {
  width: 100%;
}

.notes-with-image figure img {
  width: 100%;
  height: auto;
}

.single-image-row {
  padding: 0 var(--gutter) 70px;
}

.single-image-row img {
  width: 100%;
  height: auto;
}

.trencin-study {
  max-width: 600px;
  margin-top: 28px;
}

.article-link {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.photo-credit {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.photo-credit a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.archive-social {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  padding-top: 45px;
  padding-right: 150px;
}

.archive-social a {
  display: inline-block;
  font-size: clamp(24px,3vw,40px);
  line-height: 1.2;
  letter-spacing: -.035em;
  text-decoration: underline;
  text-underline-offset: 7px;
}

/* Location and date are supplied in content/projects.json. */
.project-meta {
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.archive-work .project-meta {
  margin-bottom: 24px;
}

.image-title .project-meta {
  color: var(--paper);
}

/* Consistent title sizes; longer names wrap within the page gutters. */
.work-section h1,
.work-section h2 {
  font-size: clamp(48px, 7vw, 112px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.05em;
  margin: 0 0 18px;
  max-width: 100%;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-align: left;
}

.archive-work h2 {
  font-size: clamp(28px, 3.5vw, 56px);
  line-height: 1.1;
}

.image-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-meta {
  padding: 0;
  margin-left: 0;
  text-align: left;
  /* Optical alignment with the title lettering, without moving the title. */
  transform: translate(6px, -12px);
}

/* Space between the title cover and the portrait video/text layout. */
.image-stage + .music-layout {
  padding-top: 60px;
}
/* CV is the final section, after the music and social links. */
.artist-cv {
  padding: 0 var(--gutter) 130px;
  color: var(--paper);
}

.artist-cv > h2 {
  padding-top: 48px;
  border-top: 1px solid #ffffff30;
  margin-bottom: 32px;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 400;
  letter-spacing: -.04em;
}

.cv-description {
  max-width: 70ch;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.65;
  color: #bdbdb8;
}

.cv-description p + p {
  margin-top: 20px;
}

.cv-group {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 24px 6vw;
  padding-top: 36px;
  margin-top: 40px;
  border-top: 1px solid #ffffff30;
}

.cv-group h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.cv-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.65;
  color: #bdbdb8;
}

.cv-group li + li {
  margin-top: 12px;
}

.cv-group strong {
  font-weight: 500;
  color: var(--paper);
}

@media (max-width: 700px) {
  .cv-group {
    grid-template-columns: 1fr;
  }
}

/* Responsive layouts and reduced motion. */
.image-expand {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-expand-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.image-stage .image-title {
  z-index: 1;
  pointer-events: none;
}

.image-expand-cover:focus-visible {
  outline-offset: -6px;
}

.image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  padding: 0;
  background: #000;
  overflow: hidden;
}

.image-viewer-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: max(72px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.image-viewer-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-viewer-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  min-height: 44px;
  padding: 10px 18px;
  background: #292929;
  z-index: 1;
}

/* Shared content centers at one-third and two-thirds of the viewport. */
.project-intro,
.project-notes,
.music-layout,
.editorial-grid,
.image-pair,
.single-image-row,
.archive,
.artist-cv {
  padding-left: var(--content-inset);
  padding-right: var(--content-inset);
}

.project-intro,
.project-notes {
  justify-content: flex-start;
}

.project-notes.notes-with-image,
.project-notes.notes-with-video,
.music-layout,
.editorial-grid,
.image-pair,
.archive-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--content-gap);
  justify-items: center;
}

:is(.notes-with-image, .notes-with-video, .music-layout, .editorial-grid, .image-pair, .archive-grid) > * {
  min-width: 0;
  width: 100%;
}

.video-pair {
  grid-template-columns: repeat(auto-fit, var(--video-native-width, 512px));
  column-gap: max(32px, calc(100vw / 3 - var(--video-native-width, 512px)));
  justify-content: center;
}

.project-credits {
  margin-block: 32px;
}

.project-credits p + p {
  margin-top: 6px;
}

@media(min-width:1600px) {
  .project-intro,
  .editorial-grid {
    padding-top: 130px;
    padding-bottom: 130px;
  }
}

@media(max-width:700px) {
  .site-header {
    padding-top: 18px;
  }
  
  .contact-link {
    right: 16px;
    bottom: max(18px,env(safe-area-inset-bottom));
    font-size: 22px;
    padding: 12px 16px;
  }
  
  .menu-toggle {
    top: 18px;
    padding: 8px 15px;
    gap: 14px;
  }
  
  .image-stage {
    min-height: 600px;
  }
  
  .image-title {
    bottom: 32px;
  }
  
  
  
  .hero-stage>img {
    object-position: 53% center;
  }
  
  .project-intro {
    padding: 60px var(--gutter);
    gap: 32px;
    display: flex;
    justify-content: flex-end;
  }
  
  .project-copy {
    font-size: 16px;
  }
  
  .image-pair {
    gap: 8px;
    padding: 0 var(--gutter) 60px;
  }

  .video-pair {
    grid-template-columns: var(--video-native-width, 512px);
    justify-content: center;
    gap: 24px;
  }
  
  .film {
    margin-bottom: 60px;
  }
  
  .editorial-grid {
    grid-template-columns: 1fr;
    padding: 60px var(--gutter);
    gap: 32px;
  }
  
  .editorial-grid .project-copy,
  .editorial-grid figure {
    grid-column: auto;
    grid-row: auto;
  }
  
  .archive {
    padding-top: 50px;
    padding-bottom: 60px;
    background: var(--ink);
    color: var(--paper);
  }
  
  .archive-grid {
    grid-template-columns: 1fr;
  }
  
  .archive-work {
    padding: 30px 0 38px;
    border-bottom: 1px solid #ffffff30;
  }
  
  
  
  .works-menu nav {
    grid-template-columns: 1fr;
    margin: 28px 0;
  }
  
  .works-menu nav a {
    font-size: 25px;
    padding: 18px 0;
    gap: 20px;
  }
  
  .works-menu {
    padding-top: 18px;
  }
  
  .project-notes {
    padding: 40px var(--gutter) 55px;
  }
  
  .video-project-heading {
    padding-top: 45px;
  }
  
  .music-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .panorama-stage {
    height: 60svh;
    min-height: 360px;
  }
  
  .featured-work>.film:last-child {
    margin-bottom: 45px;
  }
  
  .project-notes.notes-with-image,
  .project-notes.notes-with-video {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .single-image-row {
    padding-bottom: 45px;
  }
}

@media(max-width:900px) {
  :root {
    --content-inset: var(--gutter);
  }

  .project-notes.notes-with-image,
  .project-notes.notes-with-video,
  .music-layout,
  .editorial-grid,
  .image-pair,
  .archive-grid {
    grid-template-columns: minmax(0, 600px);
    justify-content: center;
    gap: 32px;
  }

  .editorial-grid .project-copy,
  .editorial-grid figure {
    grid-column: auto;
    grid-row: auto;
  }

  .video-pair {
    grid-template-columns: var(--video-native-width, 512px);
  }

  .project-intro,
  .project-notes {
    justify-content: flex-start;
  }
}

/* Photo pairs span the page; the fixed-pixel animation pair keeps its own layout. */
.image-pair:not(.video-pair) {
  padding-inline: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

@media(max-width:900px) {
  .image-pair:not(.video-pair) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation: none!important;
    transition: none!important;
  }
}
