/* Design tokens captured from lukaschmiel.com (Squarespace Montauk template):
   Source Code Pro throughout, white bg, #666 body text, fixed left sidebar. */

@font-face {
  font-family: 'Limelight';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/limelight-400-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/scp-400-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/scp-700-latin.woff2) format('woff2');
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --gap: 34px;
  --ink: #000;
  --nav: #1f1f1f;
  --nav-active: #545454;
  --body: #666;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: #fff;
  color: var(--body);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.9em;
  letter-spacing: .02em;
}

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

#canvas {
  max-width: 1800px;
  padding: 80px;
}

/* ------------------------------------------------ sidebar */

#sidebar {
  position: fixed;
  top: 80px;
  left: 80px;
  width: 310px;
}

#sidebar .logo {
  margin: 0 0 30px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2em;
  letter-spacing: .01em;
}
#sidebar .logo a { color: var(--ink); }

#sidebar nav {
  font-size: 16px;
  line-height: 1.2em;
  letter-spacing: 0;
}
#sidebar nav a,
#sidebar nav .folder-toggle {
  display: block;
  padding: .2em 0;
  color: var(--nav);
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  letter-spacing: inherit;
}
#sidebar nav a:hover,
#sidebar nav .folder-toggle:hover { color: var(--ink); }
#sidebar nav a.on { color: var(--nav-active); }

#sidebar .subnav {
  list-style: none;
  margin: 0;
  padding: .5em 0 1em;
  display: none;
}
#sidebar .folder.open .subnav { display: block; }
#sidebar .subnav li { margin-left: .5em; }
#sidebar .subnav a { padding: .2em 0; }
#sidebar .subnav a.on { color: var(--nav-active); }

#sidebar .contact {
  margin-top: 40px;
  font-size: 12px;
  line-height: 2.1em;
}
#sidebar .contact a { color: var(--body); }
#sidebar .contact a:hover { color: var(--ink); }

/* ------------------------------------------------ main */

main {
  margin-left: 380px;
}

/* home grid: every project as a video/photo thumbnail */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.tile { display: block; }

.tile-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f4f4f4;
}
.tile-media video,
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-cap {
  margin-top: 6px;
  color: var(--body);
  line-height: 1.6em;
}
.tile:hover .tile-cap { color: var(--ink); }

/* project pages: block layout mirrors the original rows/columns */

.project > * + *,
.col > * + * { margin-top: var(--gap); }

.row {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}
.row > .col {
  flex-grow: var(--span);
  flex-basis: 0;
  min-width: 0;
}

.media {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f4f4;
}

/* vertical videos: size by screen height so they fit in view */
.project video.portrait {
  width: auto;
  max-width: 100%;
  max-height: 82vh;
}

.text { max-width: 720px; }
.text a { color: var(--nav); }
.text a:hover { color: var(--ink); }

/* instagram embed */

.ig-embed .instagram-media {
  margin: 0 !important;
  max-width: 540px !important;
  min-width: 0 !important;
  width: 100% !important;
}

.press .press-head { color: var(--ink); }

/* gallery slideshow */

.slideshow { position: relative; }
.slideshow .slide { display: none; }
.slideshow .slide.on { display: block; }
.slideshow .slide img { width: 100%; display: block; }
.slideshow button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .85);
  border: 0;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  padding: 8px 14px;
  cursor: pointer;
}
.slideshow .ss-prev { left: 0; }
.slideshow .ss-next { right: 0; }
.slideshow .ss-count {
  position: absolute;
  left: 12px;
  bottom: 8px;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, .5);
}

/* ------------------------------------------------ home: big-name collage */

body.home { background: #fff; }

#home-nav {
  position: fixed;
  top: 26px;
  right: 34px;
  z-index: 10;
  display: flex;
  gap: 26px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.6em;
}
#home-nav a { color: var(--nav); }
#home-nav a:hover { color: var(--body); }

#home-wrap {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 8vw 120px;
}

.display-name {
  position: fixed;
  top: 20px;
  left: clamp(20px, 2.5vw, 44px);
  z-index: 5;
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 5.5vw, 92px);
  line-height: 1;
  letter-spacing: -.015em;
  white-space: nowrap;
  color: #000;
  pointer-events: none;
  user-select: none;
}

.collage {
  columns: 2;
  column-gap: 5vw;
  padding-top: calc(clamp(72px, 8vw, 150px) + 20px);
}

.ctile {
  display: inline-block;
  width: 100%;
  margin: 0 0 10vh;
  break-inside: avoid;
}
.ctile .tile-media {
  aspect-ratio: auto;
  background: #f4f4f4;
}
.ctile .tile-cap {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.7em;
}
.ctile:hover .tile-cap { color: var(--body); }

/* oversized tiles: xl fills its column; xxl breaks across both columns */
.ctile.xl { width: 100% !important; margin-left: 0 !important; }
.ctile.xxl {
  column-span: all;
  width: 80% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}

/* scatter variants — cycle of six placements */
.ctile.v0 { width: 84%; }
.ctile.v1 { width: 62%; margin-left: 30%; margin-top: 7vh; }
.ctile.v2 { width: 74%; margin-left: 10%; }
.ctile.v3 { width: 56%; margin-left: 36%; margin-top: 5vh; }
.ctile.v4 { width: 90%; }
.ctile.v5 { width: 66%; margin-left: 4%; margin-top: 8vh; }

/* ------------------------------------------------ mobile */

@media (max-width: 980px) {
  #canvas { padding: 20px; }
  #sidebar {
    position: static;
    width: auto;
    margin-bottom: 40px;
  }
  main { margin-left: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .row { display: block; }
  .row > .col + .col { margin-top: var(--gap); }
}

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

@media (max-width: 700px) {
  #home-nav { top: auto; bottom: 0; left: 0; right: 0; justify-content: center; gap: 18px; padding: 10px; }
  #home-wrap { padding: 20px 24px 90px; }
  .display-name { left: 24px; font-size: clamp(26px, 8.5vw, 48px); }
  .collage { position: relative; z-index: 6; }
  .collage { columns: 1; padding-top: calc(19vw + 20px); }
  .ctile, .ctile.v0, .ctile.v1, .ctile.v2, .ctile.v3, .ctile.v4, .ctile.v5 {
    width: 100%; margin-left: 0; margin-top: 0; margin-bottom: 52px;
  }
}
